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:
Goffi 2017-06-30 00:04:47 +02:00
commit d07083bff6

View file

@ -204,7 +204,7 @@ class InviteeInvite(base.CommandBase):
def add_parser_options(self):
self.parser.add_argument("-i", "--item", type=base.unicode_decoder, default=u'', help=_(u"ID of the PubSub Item"))
self.parser.add_argument("-e", "--email", type=base.unicode_decoder, default='', help='email to send the invitation to (if --no-email is set, email will just be saved)')
self.parser.add_argument("-e", "--email", action="append", type=base.unicode_decoder, default=[], help='email(s) to send the invitation to')
self.parser.add_argument("-n", "--name", type=base.unicode_decoder, default='', help='name of the invitee')
self.parser.add_argument("-N", "--host-name", type=base.unicode_decoder, default='', help='name of the host')
self.parser.add_argument("-l", "--lang", type=base.unicode_decoder, default='', help='main language spoken by the invitee')
@ -214,12 +214,15 @@ class InviteeInvite(base.CommandBase):
def start(self):
common.checkURI(self.args)
email = self.args.email[0] if self.args.email else None
emails_extra = self.args.email[1:]
self.host.bridge.eventInvite(
self.args.service,
self.args.node,
self.args.item,
self.args.email,
email,
emails_extra,
self.args.name,
self.args.host_name,
self.args.lang,