telegram: Fix UI and store useful Telegram info

Creation now works, and language preferences made before signup are
kept. telegram file storage now uses the Jellyfin ID as a key, which
makes much more sense. Also added radios to select preferred notification
method (email/telegram) as well, which the admin will soon be able to
change also.
This commit is contained in:
Harvey Tindall
2021-05-07 14:32:51 +01:00
parent 326c2cf70a
commit 72bf280e2d
7 changed files with 157 additions and 53 deletions
+2 -1
View File
@@ -22,7 +22,7 @@ type Storage struct {
profiles map[string]Profile
defaultProfile string
emails, displayprefs, ombi_template map[string]interface{}
telegram map[int64]TelegramUser
telegram map[string]TelegramUser // Map of Jellyfin User IDs to telegram users.
customEmails customEmails
policy mediabrowser.Policy
configuration mediabrowser.Configuration
@@ -34,6 +34,7 @@ type TelegramUser struct {
ChatID int64
Username string
Lang string
Contact bool // Whether to contact through telegram or not
}
type customEmails struct {