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:
+10
@@ -28,6 +28,16 @@ func (tv TelegramVerifiedToken) ToUser() *TelegramUser {
|
||||
}
|
||||
}
|
||||
|
||||
func EmptyTelegramUser() *TelegramUser {
|
||||
return &TelegramUser{
|
||||
JellyfinID: "",
|
||||
ChatID: 0,
|
||||
Username: "",
|
||||
Lang: "",
|
||||
Contact: false,
|
||||
}
|
||||
}
|
||||
|
||||
func (t *TelegramVerifiedToken) Name() string { return t.Username }
|
||||
func (t *TelegramVerifiedToken) SetMethodID(id any) { t.ChatID = id.(int64) }
|
||||
func (t *TelegramVerifiedToken) MethodID() any { return t.ChatID }
|
||||
|
||||
Reference in New Issue
Block a user