Implement reactions from the matrix side
This commit is contained in:
@@ -29,6 +29,7 @@ func (b *Bridge) setupEvents() {
|
||||
}
|
||||
|
||||
b.eventProcessor.On(event.EventMessage, b.matrixHandler.handleMessage)
|
||||
b.eventProcessor.On(event.EventReaction, b.matrixHandler.handleReaction)
|
||||
b.eventProcessor.On(event.StateMember, b.matrixHandler.handleMembership)
|
||||
}
|
||||
|
||||
@@ -230,3 +231,14 @@ func (mh *matrixHandler) handleMembership(evt *event.Event) {
|
||||
portal.handleMatrixInvite(user, evt)
|
||||
}
|
||||
}
|
||||
|
||||
func (mh *matrixHandler) handleReaction(evt *event.Event) {
|
||||
if mh.ignoreEvent(evt) {
|
||||
return
|
||||
}
|
||||
|
||||
portal := mh.bridge.GetPortalByMXID(evt.RoomID)
|
||||
if portal != nil {
|
||||
portal.handleMatrixReaction(evt)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user