plugin events, invitations + jp (event/create, invitation/invitee/invite): several emails addresses can now be specified for a single invitation:
if several addresses are specified, the same invitation (same ID and data) is sent to all the addresses
This commit is contained in:
parent
1540936d12
commit
d07083bff6
1 changed files with 33 additions and 13 deletions
|
|
@ -74,7 +74,7 @@ class Events(object):
|
|||
in_sign='ssa{ss}s', out_sign='',
|
||||
method=self._eventInviteeSet,
|
||||
async=True)
|
||||
host.bridge.addMethod("eventInvite", ".plugin", in_sign='sssssssssss', out_sign='',
|
||||
host.bridge.addMethod("eventInvite", ".plugin", in_sign='ssssassssssss', out_sign='',
|
||||
method=self._invite,
|
||||
async=True)
|
||||
|
||||
|
|
@ -320,10 +320,12 @@ class Events(object):
|
|||
item_elt = pubsub.Item(id=client.jid.userhost(), payload=event_elt)
|
||||
return self._p.publish(client, service, node, items=[item_elt])
|
||||
|
||||
def _invite(self, service, node, id_=NS_EVENT, email=u'', name=u'', host_name=u'', language=u'', url_template=u'',
|
||||
def _invite(self, service, node, id_=NS_EVENT, email=u'', emails_extra=None, name=u'', host_name=u'', language=u'', url_template=u'',
|
||||
message_subject=u'', message_body=u'', profile_key=C.PROF_KEY_NONE):
|
||||
client = self.host.getClient(profile_key)
|
||||
kwargs = {u'profile': client.profile}
|
||||
kwargs = {u'profile': client.profile,
|
||||
u'emails_extra': [unicode(e) for e in emails_extra]
|
||||
}
|
||||
for key in ("email", "name", "host_name", "language", "url_template", "message_subject", "message_body"):
|
||||
value = locals()[key]
|
||||
kwargs[key] = unicode(value)
|
||||
|
|
|
|||
Loading…
Reference in a new issue