plugins invitation*, events: added an extra parameter and use it to keep a thumnail URL
This commit is contained in:
parent
2dfae32542
commit
d3e86f4ba2
1 changed files with 62 additions and 23 deletions
|
|
@ -231,7 +231,8 @@ class Events(object):
|
|||
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 @@ class Events(object):
|
|||
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 @@ class Events(object):
|
|||
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 @@ class Events(object):
|
|||
@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 @@ class Events(object):
|
|||
# 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"",
|
||||
|
|
|
|||
Loading…
Reference in a new issue