From 6d2e517e82c79f851fb71f7ffeadbb9d65088e23 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Wed, 26 Nov 2025 18:03:45 +0000 Subject: [PATCH] api-users: trigger tps contact info link on admin newUser only adds email, since that's all that's available. --- api-jellyseerr.go | 2 +- api-users.go | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/api-jellyseerr.go b/api-jellyseerr.go index 232b6e5..3a5da5c 100644 --- a/api-jellyseerr.go +++ b/api-jellyseerr.go @@ -144,7 +144,7 @@ func (js *JellyseerrWrapper) AddContactMethods(jellyfinID string, req newUserDTO contactMethods[jellyseerr.FieldDiscord] = discord.ID contactMethods[jellyseerr.FieldDiscordEnabled] = req.DiscordContact } - if telegramEnabled && discord != nil { + if telegramEnabled && telegram != nil { contactMethods[jellyseerr.FieldTelegram] = telegram.ChatID contactMethods[jellyseerr.FieldTelegramEnabled] = req.TelegramContact } diff --git a/api-users.go b/api-users.go index 13aa233..aac73e8 100644 --- a/api-users.go +++ b/api-users.go @@ -62,6 +62,17 @@ func (app *appContext) NewUserFromAdmin(gc *gin.Context) { app.storage.SetEmailsKey(nu.User.ID, emailStore) } + for _, tps := range app.thirdPartyServices { + if !tps.Enabled(app, &profile) { + continue + } + // We only have email + err := tps.AddContactMethods(nu.User.ID, req, nil, nil) + if err != nil { + app.err.Printf(lm.FailedSyncContactMethods, tps.Name(), err) + } + } + welcomeMessageSentIfNecessary := true if nu.Created { welcomeMessageSentIfNecessary = !app.WelcomeNewUser(nu.User, time.Time{})