Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jfa-go/commit/f34ba5df18cd78dfdc8ca8cb8877b09191b83edd You should set ROOT_URL correctly, otherwise the web may not work correctly.

invites: fix sending invite to @username discord format

whether something was an email or not was being decided by checking for
an "@", so the new format didn't work.
activity-log
Harvey Tindall 2 years ago
parent 43e36ee6fc
commit f34ba5df18
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -192,7 +192,7 @@ func (app *appContext) GenerateInvite(gc *gin.Context) {
addressValid := false
discord := ""
app.debug.Printf("%s: Sending invite message", invite.Code)
if discordEnabled && !strings.Contains(req.SendTo, "@") {
if discordEnabled && (!strings.Contains(req.SendTo, "@") || strings.HasPrefix(req.SendTo, "@")) {
users := app.discord.GetUsers(req.SendTo)
if len(users) == 0 {
invite.SendTo = fmt.Sprintf("Failed: User not found: \"%s\"", req.SendTo)

Loading…
Cancel
Save