diff options
author | Tulir Asokan <tulir@maunium.net> | 2019-01-11 23:28:47 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2019-01-11 23:28:47 +0200 |
commit | 331597b9f8a7942cbcb233a328301e4d5bf94fb0 (patch) | |
tree | 5ec624585ebf66c63549a098acb6f7421f1193a7 /matrix/matrix.go | |
parent | 2fc3378b717f40f37f3a188b68407887242d9c06 (diff) |
Switch to Go modules and make other changes
Diffstat (limited to 'matrix/matrix.go')
-rw-r--r-- | matrix/matrix.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go index 54efd6e..b119fc9 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -34,7 +34,7 @@ import ( "crypto/tls" "encoding/json" - "gopkg.in/russross/blackfriday.v2" + "github.com/russross/blackfriday/v2" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" "maunium.net/go/gomuks/interface" @@ -194,6 +194,10 @@ func (c *Container) OnLogin() { debug.Print("Initializing syncer") c.syncer = NewGomuksSyncer(c.config) c.syncer.OnEventType(mautrix.EventMessage, c.HandleMessage) + c.syncer.OnEventType(mautrix.StateAliases, c.HandleMessage) + c.syncer.OnEventType(mautrix.StateCanonicalAlias, c.HandleMessage) + c.syncer.OnEventType(mautrix.StateTopic, c.HandleMessage) + c.syncer.OnEventType(mautrix.StateRoomName, c.HandleMessage) c.syncer.OnEventType(mautrix.StateMember, c.HandleMembership) c.syncer.OnEventType(mautrix.EphemeralEventReceipt, c.HandleReadReceipt) c.syncer.OnEventType(mautrix.EphemeralEventTyping, c.HandleTyping) @@ -290,7 +294,7 @@ func (c *Container) HandleMessage(source EventSource, evt *mautrix.Event) { c.ui.Render() } } else { - debug.Printf("Parsing event %v failed (ParseEvent() returned nil).", evt) + debug.Printf("Parsing event %s type %s %v from %s in %s failed (ParseEvent() returned nil).", evt.ID, evt.Type, evt.Content.Raw, evt.Sender, evt.RoomID) } } |