Mercurial > libervia-backend
diff sat/plugins/plugin_exp_events.py @ 2931:b256e90612d0
plugins invitation*, events: added an extra parameter and use it to keep a thumnail URL
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 03 May 2019 13:05:01 +0200 |
parents | a3faf1c86596 |
children | 4f600b4ae819 |
line wrap: on
line diff
--- a/sat/plugins/plugin_exp_events.py Fri May 03 13:00:08 2019 +0200 +++ b/sat/plugins/plugin_exp_events.py Fri May 03 13:05:01 2019 +0200 @@ -231,7 +231,8 @@ raise exceptions.NotFound(_(u"No event with this id has been found")) defer.returnValue(event_elt) - def register(self, client, service, node, event_id, event_elt, creator=False): + def register(self, client, name, extra, service, node, event_id, event_elt, + creator=False): """register evenement in personal events list @param service(jid.JID): pubsub service of the event @@ -241,6 +242,7 @@ note that this element will be modified in place @param creator(bool): True if client's profile is the creator of the node """ + # FIXME: name and extra are unused link_elt = event_elt.addElement("link") link_elt["service"] = service.full() link_elt["node"] = node @@ -371,7 +373,8 @@ yield self._p.publish(client, service, node, items=[item_elt]) if register: - yield self.register(client, service, node, event_id, event_elt, creator=True) + yield self.register( + client, service, None, {}, node, event_id, event_elt, creator=True) defer.returnValue(node) def _eventModify(self, service, node, id_, timestamp_update, data_update, @@ -546,6 +549,9 @@ @param node(unicode): event node @param item_id(unicode): event id """ + # FIXME: handle name and extra + name = u'' + extra = {} if self._b is None: raise exceptions.FeatureNotFound( _(u'"XEP-0277" (blog) plugin is needed for this feature') @@ -590,7 +596,7 @@ # now we send the invitation pubsub_invitation = self.host.plugins[u'PUBSUB_INVITATION'] pubsub_invitation.sendPubsubInvitation(client, invitee_jid, service, node, - item_id) + item_id, name, extra) def _inviteByEmail(self, service, node, id_=NS_EVENT, email=u"", emails_extra=None, name=u"", host_name=u"", language=u"", url_template=u"",