Random changes
This commit is contained in:
parent
44bcf5044b
commit
cfd5f7ae54
@ -21,8 +21,9 @@ package matrix
|
|||||||
import (
|
import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"maunium.net/go/gomuks/debug"
|
|
||||||
"maunium.net/go/mautrix/crypto"
|
"maunium.net/go/mautrix/crypto"
|
||||||
|
|
||||||
|
"maunium.net/go/gomuks/debug"
|
||||||
)
|
)
|
||||||
|
|
||||||
type cryptoLogger struct{}
|
type cryptoLogger struct{}
|
||||||
|
@ -346,7 +346,11 @@ func (c *Container) OnLogin() {
|
|||||||
if c.crypto != nil {
|
if c.crypto != nil {
|
||||||
c.syncer.OnSync(c.crypto.ProcessSyncResponse)
|
c.syncer.OnSync(c.crypto.ProcessSyncResponse)
|
||||||
c.syncer.OnEventType(event.StateMember, func(source EventSource, evt *event.Event) {
|
c.syncer.OnEventType(event.StateMember, func(source EventSource, evt *event.Event) {
|
||||||
|
// 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.crypto.HandleMemberEvent(evt)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
c.syncer.OnEventType(event.EventEncrypted, c.HandleEncrypted)
|
c.syncer.OnEventType(event.EventEncrypted, c.HandleEncrypted)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user