aboutsummaryrefslogtreecommitdiff
path: root/matrix/rooms
diff options
context:
space:
mode:
Diffstat (limited to 'matrix/rooms')
-rw-r--r--matrix/rooms/room.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/matrix/rooms/room.go b/matrix/rooms/room.go
index 7feae89..0238cfb 100644
--- a/matrix/rooms/room.go
+++ b/matrix/rooms/room.go
@@ -213,6 +213,10 @@ func (room *Room) Unload() bool {
debug.Print("Unloading", room.ID)
room.Save()
room.state = nil
+ room.memberCache = nil
+ room.exMemberCache = nil
+ room.firstMemberCache = nil
+ room.secondMemberCache = nil
if room.postUnload != nil {
room.postUnload()
}
@@ -408,7 +412,7 @@ func (room *Room) UpdateState(evt *event.Event) {
case *event.TopicEventContent:
room.topicCache = content.Topic
case *event.EncryptionEventContent:
- if content.Algorithm == "m.megolm.v1.aes-sha2" {
+ if content.Algorithm == event.AlgorithmMegolmV1 {
room.Encrypted = true
}
}