diff options
Diffstat (limited to 'appservice/server.go')
-rw-r--r-- | appservice/server.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/appservice/server.go b/appservice/server.go index 00f23f1..2690e58 100644 --- a/appservice/server.go +++ b/appservice/server.go @@ -144,5 +144,14 @@ func handleTxnEvent(e *mxlib.Event) { } } } + } else if e.Type == "m.room.topic" { + if room := dbIsPublicRoom(e.RoomId); room != nil { + acct := FindJoinedAccount(e.Sender, room.Protocol, room.RoomID) + if acct != nil { + acct.Conn.SetRoomInfo(room.RoomID, &connector.RoomInfo{ + Topic: e.Content["topic"].(string), + }) + } + } } } |