1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2025-04-08 12:12:54 +00:00
This commit is contained in:
Mavyre 2024-11-22 02:45:16 +01:00 committed by GitHub
commit dea58c21a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -337,11 +337,13 @@ func (app *appContext) PostNewUserFromInvite(nu NewUserData, req ConfirmationKey
// FIXME: figure these out in a nicer way? this relies on the current ordering, // FIXME: figure these out in a nicer way? this relies on the current ordering,
// which may not be fixed. // which may not be fixed.
if discordEnabled { if discordEnabled {
discordUser = req.completeContactMethods[0].User.(*DiscordUser) if req.completeContactMethods[0].User != nil {
if telegramEnabled { discordUser = req.completeContactMethods[0].User.(*DiscordUser)
}
if telegramEnabled && req.completeContactMethods[1].User != nil {
telegramUser = req.completeContactMethods[1].User.(*TelegramUser) telegramUser = req.completeContactMethods[1].User.(*TelegramUser)
} }
} else if telegramEnabled { } else if telegramEnabled && req.completeContactMethods[0].User != nil {
telegramUser = req.completeContactMethods[0].User.(*TelegramUser) telegramUser = req.completeContactMethods[0].User.(*TelegramUser)
} }
} }