diff --git a/base-config.yaml b/base-config.yaml index f9ac727..709829a 100644 --- a/base-config.yaml +++ b/base-config.yaml @@ -8,6 +8,12 @@ legacy_mr: true # how to get to the matrix-registration instance # note the lack of trailing slash! reg_url: 'https://www.yourwebsite.com' + +# the URI to use for registering tokens +# leave this as the default value unless you are using +# a custom registration page! +reg_page: '/register' + # the duration the invitation should be valid, in days, before expiring expiration: 3 diff --git a/invite.py b/invite.py index ce0b557..e8cf3df 100644 --- a/invite.py +++ b/invite.py @@ -12,6 +12,7 @@ class Config(BaseProxyConfig): helper.copy("admin_secret") helper.copy("legacy_mr") helper.copy("reg_url") + helper.copy("reg_page") helper.copy("admins") helper.copy("expiration") @@ -84,7 +85,7 @@ class Invite(Plugin): f"Invitation token {token} created! You may share the following message with your invitee:", f"", f"Your unique url for registering is:", - f"{self.config['reg_url']}/register?token={token}", + f"{self.config['reg_url']}{self.config['reg_page']}?token={token}", f"This invite token will expire in {self.config['expiration']} days.", f"If it expires before use, you must request a new token." ] diff --git a/maubot.yaml b/maubot.yaml index d67e83b..5e9fa40 100644 --- a/maubot.yaml +++ b/maubot.yaml @@ -1,6 +1,6 @@ maubot: 0.1.0 id: org.jobmachine.invitebot -version: 0.2.0 +version: 0.2.1 license: MIT modules: - invite