Wait up to 3 seconds for encryption keys to arrive
This commit is contained in:
5
main.go
5
main.go
@@ -44,7 +44,7 @@ var (
|
||||
Name = "mautrix-whatsapp"
|
||||
URL = "https://github.com/tulir/mautrix-whatsapp"
|
||||
// This is changed when making a release
|
||||
Version = "0.1.4"
|
||||
Version = "0.1.4"
|
||||
// This is filled by init()
|
||||
WAVersion = ""
|
||||
// These are filled at build time with the -X linker flag
|
||||
@@ -134,7 +134,7 @@ type Bridge struct {
|
||||
Formatter *Formatter
|
||||
Relaybot *User
|
||||
Crypto Crypto
|
||||
Metrics *MetricsHandler
|
||||
Metrics *MetricsHandler
|
||||
|
||||
usersByMXID map[id.UserID]*User
|
||||
usersByJID map[types.WhatsAppID]*User
|
||||
@@ -153,6 +153,7 @@ type Crypto interface {
|
||||
HandleMemberEvent(*event.Event)
|
||||
Decrypt(*event.Event) (*event.Event, error)
|
||||
Encrypt(id.RoomID, event.Type, event.Content) (*event.EncryptedEventContent, error)
|
||||
WaitForSession(id.RoomID, id.SenderKey, id.SessionID, time.Duration) bool
|
||||
Init() error
|
||||
Start()
|
||||
Stop()
|
||||
|
||||
Reference in New Issue
Block a user