diff --git a/src/plugins/plugin_misc_invitations.py b/src/plugins/plugin_misc_invitations.py index 216cddc6..534c285d 100644 --- a/src/plugins/plugin_misc_invitations.py +++ b/src/plugins/plugin_misc_invitations.py @@ -112,7 +112,7 @@ class InvitationsPlugin(object): use None if you don't want to include URL (or if it is already specified in custom message) /!\ you must put full URL, don't forget https:// /!\ the URL will give access to the invitee account, you should warn in message to not publish it publicly - message_subject(unicode, None): customised message body for t:o he invitation email + message_subject(unicode, None): customised message body for the invitation email None to use default subject uses the same substitution as for message_body message_body(unicode, None): customised message body for the invitation email @@ -143,6 +143,10 @@ class InvitationsPlugin(object): raise exceptions.ValueError(_(u"You can't use following key(s) in extra, they are reserved: {}").format( u', '.join(EXTRA_RESERVED.intersection(extra)))) + if not 'url_template' in extra and not 'message_body' in extra: + raise ValueError(_(u"You need to provide url_template if you use default message body")) + + ## uuid log.info(_(u"creating an invitation")) id_ = unicode(shortuuid.uuid())