aboutsummaryrefslogtreecommitdiff
path: root/matrix/rooms
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-04-24 16:51:40 +0300
committerTulir Asokan <tulir@maunium.net>2018-04-24 16:51:40 +0300
commite64df67ec397795b8c6ebd06b391d953afe5a766 (patch)
tree52cbb9d3d02ec1e89d0de09a05d343408c7d4aba /matrix/rooms
parentfcd9a932cb5542ed8980fc1daba7ee1f0041a3f2 (diff)
Everything is no longer broken
Diffstat (limited to 'matrix/rooms')
-rw-r--r--matrix/rooms/room.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/matrix/rooms/room.go b/matrix/rooms/room.go
index 44a386b..9aae5ea 100644
--- a/matrix/rooms/room.go
+++ b/matrix/rooms/room.go
@@ -23,6 +23,7 @@ import (
"time"
"maunium.net/go/gomatrix"
+ "maunium.net/go/gomuks/debug"
)
type RoomNameSource int
@@ -148,6 +149,15 @@ func (room *Room) UpdateState(event *gomatrix.Event) {
case "m.room.topic":
room.topicCache = ""
}
+
+ stateKey := ""
+ if event.StateKey != nil {
+ stateKey = *event.StateKey
+ }
+ if event.Type != "m.room.member" {
+ debug.Printf("[ROOM] Updating state %s#%s for %s", event.Type, stateKey, room.ID)
+ }
+
if event.StateKey == nil {
room.State[event.Type][""] = event
} else {