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:
Harvey Tindall
2025-11-26 20:57:11 +00:00
parent 1d4ea7d0a0
commit 27a80734f9
14 changed files with 232 additions and 108 deletions

View File

@@ -16,6 +16,16 @@ import (
lm "github.com/hrfee/jfa-go/logmessages"
)
const (
BogusIdentifier = "123412341234123456"
)
// ContactPreferences holds whether or not a user should be contacted through each of the available
// methods. If nil, leave setting alone.
type ContactPreferences struct {
Email, Discord, Telegram, Matrix *bool
}
// TimeoutHandler recovers from an http timeout or panic.
type TimeoutHandler func()