Discord: Add option to provide server invite

When enabled, a temporary one-use invite is created and shown to the
user on the account creation form.
This commit is contained in:
Harvey Tindall
2021-05-23 19:50:03 +01:00
parent 0676b6c41f
commit 1f9af8df89
10 changed files with 166 additions and 14 deletions
+3
View File
@@ -123,6 +123,9 @@ func (app *appContext) loadRoutes(router *gin.Engine) {
}
if discordEnabled {
router.GET(p+"/invite/:invCode/discord/verified/:pin", app.DiscordVerifiedInvite)
if app.config.Section("discord").Key("provide_invite").MustBool(false) {
router.GET(p+"/invite/:invCode/discord/invite", app.DiscordServerInvite)
}
}
}
if *SWAGGER {