Handle leaving and kicking from Matrix. Fixes #47

This commit is contained in:
Tulir Asokan
2020-06-25 23:33:11 +03:00
parent 3a571b2c7a
commit fed6756ae5
3 changed files with 53 additions and 8 deletions

View File

@@ -142,6 +142,7 @@ func (mx *MatrixHandler) HandleMembership(evt *event.Event) {
content := evt.Content.AsMember()
if content.Membership == event.MembershipInvite && id.UserID(evt.GetStateKey()) == mx.as.BotMXID() {
mx.HandleBotInvite(evt)
return
}
portal := mx.bridge.GetPortalByMXID(evt.RoomID)