Commit 8b6a1d1c authored by Philipp Hörist's avatar Philipp Hörist

Receipts: Simplify event code

parent 19b2911b
......@@ -941,12 +941,8 @@ class ChatControl(ChatControlBase):
else:
self.old_msg_kind = kind
@event_filter(['account', 'jid'])
def _receipt_received(self, event):
if event.conn.name != self.account:
return
if event.jid != self.contact.jid:
return
self.conv_textview.show_receipt(event.receipt_id)
def get_tab_label(self):
......
......@@ -65,13 +65,13 @@ class Receipts(BaseModule):
jid = properties.jid
if not properties.is_muc_pm:
jid = properties.jid.getBare()
jid.setBare()
app.nec.push_incoming_event(
NetworkEvent('receipt-received',
conn=self._con,
receipt_id=properties.receipt.id,
jid=jid))
account=self._account,
jid=jid,
receipt_id=properties.receipt.id))
raise nbxmpp.NodeProcessed
......
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