include new value for custom registration page uri

This commit is contained in:
William Kray 2021-05-12 12:17:21 -07:00
parent 8565238894
commit ef08b5d04c
3 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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."
]

View File

@ -1,6 +1,6 @@
maubot: 0.1.0
id: org.jobmachine.invitebot
version: 0.2.0
version: 0.2.1
license: MIT
modules:
- invite