ThirdPartyServices: SetContactMethods for setting, enable/disable
replace AddContactMethods with a more generalised SetContactMethods, which can set (or leave alone) contact method addresses/names/ids and set (or leave alone) contact preferences. A little awkward to use, but works everywhere, and now a bunch of Jellyseerr integration features are present for Ombi (which they should've been anyway).
This commit is contained in:
+5
-1
@@ -625,7 +625,11 @@ type ThirdPartyService interface {
|
||||
common.ConfigurableTransport
|
||||
// ok implies user imported, err can be any issue that occurs during
|
||||
ImportUser(jellyfinID string, req newUserDTO, profile Profile) (err error, ok bool)
|
||||
AddContactMethods(jellyfinID string, req newUserDTO, discord *DiscordUser, telegram *TelegramUser) (err error)
|
||||
// SetContactMethods allows setting any combination of contact method address/username/id and contact preference. To leave fields alone, pass nil pointers, to set them to a blank value, use "" or Empty(Discord|Telegram|Matrix)User(). Ignores the "Contact" field in some xyzUser structs.
|
||||
SetContactMethods(jellyfinID string, email *string, discord *DiscordUser, telegram *TelegramUser, contactPrefs *common.ContactPreferences) (err error)
|
||||
// Enabled returns whether this service is enabled in the given profile.
|
||||
// Not for checking if the service is enabled in general!
|
||||
// If it wasn't, it wouldn't be in app.thirdPartyServices.
|
||||
Enabled(app *appContext, profile *Profile) bool
|
||||
Name() string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user