diff options
author | Tulir Asokan <tulir@maunium.net> | 2020-05-05 21:15:53 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2020-05-05 21:15:53 +0300 |
commit | cfd5f7ae54fa2f4a21236665c9e685a3fabde5b6 (patch) | |
tree | 66b093779ff0b4ad3fa21fc507f8c5923787a8f8 /matrix/matrix.go | |
parent | 44bcf5044be0c3811c04d6210f8e818fe5d6b025 (diff) |
Random changes
Diffstat (limited to 'matrix/matrix.go')
-rw-r--r-- | matrix/matrix.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go index 4ea6bd2..30e28fb 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -346,7 +346,11 @@ func (c *Container) OnLogin() { if c.crypto != nil { c.syncer.OnSync(c.crypto.ProcessSyncResponse) c.syncer.OnEventType(event.StateMember, func(source EventSource, evt *event.Event) { - c.crypto.HandleMemberEvent(evt) + // Don't spam the crypto module with member events of an initial sync + // TODO invalidate all group sessions when clearing cache? + if c.config.AuthCache.InitialSyncDone { + c.crypto.HandleMemberEvent(evt) + } }) c.syncer.OnEventType(event.EventEncrypted, c.HandleEncrypted) } else { |