comparison sat/plugins/plugin_exp_events.py @ 3708:09112b1c3e05

plugin events: store `interest_id` in data: ID of the item in list of interest is needed to correctly modify (and notably retract) an event.
author Goffi <goffi@goffi.org>
date Fri, 12 Nov 2021 17:18:23 +0100
parents be6d91572633
children 09f5ac48ffe3
comparison
equal deleted inserted replaced
3707:cca538f795de 3708:09112b1c3e05
426 _("No event found in item {item_id}, ignoring").format( 426 _("No event found in item {item_id}, ignoring").format(
427 item_id=item["id"]) 427 item_id=item["id"])
428 ) 428 )
429 else: 429 else:
430 timestamp, data = self._parseEventElt(event_elt) 430 timestamp, data = self._parseEventElt(event_elt)
431 data["interest_id"] = item["id"]
431 events.append((timestamp, data)) 432 events.append((timestamp, data))
432 defer.returnValue(events) 433 defer.returnValue(events)
433 434
434 def _eventInviteeGet(self, service, node, invitee_jid_s, profile_key): 435 def _eventInviteeGet(self, service, node, invitee_jid_s, profile_key):
435 service = jid.JID(service) if service else None 436 service = jid.JID(service) if service else None