mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 17:10:10 +00:00
Merge remote-tracking branch 'origin/main' into activity-log
This commit is contained in:
commit
a288ba4461
@ -214,7 +214,7 @@ func (app *appContext) GenerateInvite(gc *gin.Context) {
|
|||||||
addressValid := false
|
addressValid := false
|
||||||
discord := ""
|
discord := ""
|
||||||
app.debug.Printf("%s: Sending invite message", invite.Code)
|
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)
|
users := app.discord.GetUsers(req.SendTo)
|
||||||
if len(users) == 0 {
|
if len(users) == 0 {
|
||||||
invite.SendTo = fmt.Sprintf("Failed: User not found: \"%s\"", req.SendTo)
|
invite.SendTo = fmt.Sprintf("Failed: User not found: \"%s\"", req.SendTo)
|
||||||
|
Loading…
Reference in New Issue
Block a user