Commit 94479dd7 authored by Philipp Hörist's avatar Philipp Hörist

Check if event was not consumed

Fixes #9096
parent 43f210bb
Pipeline #2870 passed with stages
in 3 minutes and 30 seconds
......@@ -1619,18 +1619,24 @@ class Interface:
self.roster.open_event(account, fjid, event)
elif type_ == 'gc-invitation':
event = app.events.get_first_event(account, jid, type_)
if event is None:
return
dialogs.InvitationReceivedDialog(account, event.room_jid, jid,
event.password, event.reason, event.is_continued)
app.events.remove_events(account, jid, event)
self.roster.draw_contact(jid, account)
elif type_ == 'subscription_request':
event = app.events.get_first_event(account, jid, type_)
if event is None:
return
dialogs.SubscriptionRequestWindow(jid, event.text, account,
event.nick)
app.events.remove_events(account, jid, event)
self.roster.draw_contact(jid, account)
elif type_ == 'unsubscribed':
event = app.events.get_first_event(account, jid, type_)
if event is None:
return
self.show_unsubscribed_dialog(account, event.contact)
app.events.remove_events(account, jid, event)
self.roster.draw_contact(jid, account)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment