From e9fdec14220f2a91fade4af88fb8ff7de902329a Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Mon, 17 Feb 2025 06:33:49 +0530 Subject: [PATCH 1/7] feat(notifications): make images optional --- server/lib/notifications/agents/discord.ts | 12 ++++++++---- server/lib/notifications/agents/email.ts | 8 +++++--- server/lib/notifications/agents/pushover.ts | 6 ++++-- server/lib/notifications/agents/slack.ts | 19 +++++++++++-------- server/lib/notifications/agents/telegram.ts | 8 +++++--- server/lib/notifications/agents/webpush.ts | 4 +++- server/lib/settings/index.ts | 10 ++++++++++ server/routes/settings/notifications.ts | 3 +++ server/templates/email/media-request/html.pug | 9 +++++---- .../Notifications/NotificationsDiscord.tsx | 10 ++++++++++ .../Notifications/NotificationsEmail.tsx | 18 ++++++++++++++---- .../NotificationsPushover/index.tsx | 10 ++++++++++ .../NotificationsSlack/index.tsx | 10 ++++++++++ .../Notifications/NotificationsTelegram.tsx | 10 ++++++++++ .../NotificationsWebPush/index.tsx | 15 ++++++++++++++- 15 files changed, 122 insertions(+), 30 deletions(-) diff --git a/server/lib/notifications/agents/discord.ts b/server/lib/notifications/agents/discord.ts index cabd332def..617fae435a 100644 --- a/server/lib/notifications/agents/discord.ts +++ b/server/lib/notifications/agents/discord.ts @@ -109,7 +109,9 @@ class DiscordAgent type: Notification, payload: NotificationPayload ): DiscordRichEmbed { - const { applicationUrl } = getSettings().main; + const settings = getSettings(); + const { applicationUrl } = settings.main; + const { embedImage } = settings.notifications.agents.discord; const appUrl = applicationUrl || `http://localhost:${process.env.port || 5055}`; @@ -223,9 +225,11 @@ class DiscordAgent } : undefined, fields, - thumbnail: { - url: payload.image, - }, + thumbnail: embedImage + ? { + url: payload.image, + } + : undefined, }; } diff --git a/server/lib/notifications/agents/email.ts b/server/lib/notifications/agents/email.ts index 59c5b4aa78..7bbf52253c 100644 --- a/server/lib/notifications/agents/email.ts +++ b/server/lib/notifications/agents/email.ts @@ -48,7 +48,9 @@ class EmailAgent recipientEmail: string, recipientName?: string ): EmailOptions | undefined { - const { applicationUrl, applicationTitle } = getSettings().main; + const settings = getSettings(); + const { applicationUrl, applicationTitle } = settings.main; + const { embedImage } = settings.notifications.agents.email; if (type === Notification.TEST_NOTIFICATION) { return { @@ -129,7 +131,7 @@ class EmailAgent body, mediaName: payload.subject, mediaExtra: payload.extra ?? [], - imageUrl: payload.image, + imageUrl: embedImage ? payload.image : undefined, timestamp: new Date().toTimeString(), requestedBy: payload.request.requestedBy.displayName, actionUrl: applicationUrl @@ -176,7 +178,7 @@ class EmailAgent issueComment: payload.comment?.message, mediaName: payload.subject, extra: payload.extra ?? [], - imageUrl: payload.image, + imageUrl: embedImage ? payload.image : undefined, timestamp: new Date().toTimeString(), actionUrl: applicationUrl ? `${applicationUrl}/issues/${payload.issue.id}` diff --git a/server/lib/notifications/agents/pushover.ts b/server/lib/notifications/agents/pushover.ts index db5176a765..dd8996b991 100644 --- a/server/lib/notifications/agents/pushover.ts +++ b/server/lib/notifications/agents/pushover.ts @@ -78,7 +78,9 @@ class PushoverAgent type: Notification, payload: NotificationPayload ): Promise> { - const { applicationUrl, applicationTitle } = getSettings().main; + const settings = getSettings(); + const { applicationUrl, applicationTitle } = settings.main; + const { embedImage } = settings.notifications.agents.pushover; const title = payload.event ?? payload.subject; let message = payload.event ? `${payload.subject}` : ''; @@ -155,7 +157,7 @@ class PushoverAgent let attachment_base64; let attachment_type; - if (payload.image) { + if (embedImage && payload.image) { const imagePayload = await this.getImagePayload(payload.image); if (imagePayload.attachment_base64 && imagePayload.attachment_type) { attachment_base64 = imagePayload.attachment_base64; diff --git a/server/lib/notifications/agents/slack.ts b/server/lib/notifications/agents/slack.ts index 8f1f0c9535..8f4ffdaabf 100644 --- a/server/lib/notifications/agents/slack.ts +++ b/server/lib/notifications/agents/slack.ts @@ -63,7 +63,9 @@ class SlackAgent type: Notification, payload: NotificationPayload ): SlackBlockEmbed { - const { applicationUrl, applicationTitle } = getSettings().main; + const settings = getSettings(); + const { applicationUrl, applicationTitle } = settings.main; + const { embedImage } = settings.notifications.agents.slack; const fields: EmbedField[] = []; @@ -159,13 +161,14 @@ class SlackAgent type: 'mrkdwn', text: payload.message, }, - accessory: payload.image - ? { - type: 'image', - image_url: payload.image, - alt_text: payload.subject, - } - : undefined, + accessory: + embedImage && payload.image + ? { + type: 'image', + image_url: payload.image, + alt_text: payload.subject, + } + : undefined, }); } diff --git a/server/lib/notifications/agents/telegram.ts b/server/lib/notifications/agents/telegram.ts index 01d4de4973..6a2b0144ab 100644 --- a/server/lib/notifications/agents/telegram.ts +++ b/server/lib/notifications/agents/telegram.ts @@ -65,7 +65,9 @@ class TelegramAgent type: Notification, payload: NotificationPayload ): Partial { - const { applicationUrl, applicationTitle } = getSettings().main; + const settings = getSettings(); + const { applicationUrl, applicationTitle } = settings.main; + const { embedImage } = settings.notifications.agents.telegram; /* eslint-disable no-useless-escape */ let message = `\*${this.escapeText( @@ -142,7 +144,7 @@ class TelegramAgent } /* eslint-enable */ - return payload.image + return embedImage && payload.image ? { photo: payload.image, caption: message, @@ -160,7 +162,7 @@ class TelegramAgent ): Promise { const settings = this.getSettings(); const endpoint = `${this.baseUrl}bot${settings.options.botAPI}/${ - payload.image ? 'sendPhoto' : 'sendMessage' + settings.embedImage && payload.image ? 'sendPhoto' : 'sendMessage' }`; const notificationPayload = this.getNotificationPayload(type, payload); diff --git a/server/lib/notifications/agents/webpush.ts b/server/lib/notifications/agents/webpush.ts index 56472018e8..0ac5cd4708 100644 --- a/server/lib/notifications/agents/webpush.ts +++ b/server/lib/notifications/agents/webpush.ts @@ -42,6 +42,8 @@ class WebPushAgent type: Notification, payload: NotificationPayload ): PushNotificationPayload { + const { embedImage } = getSettings().notifications.agents.webpush; + const mediaType = payload.media ? payload.media.mediaType === MediaType.MOVIE ? 'movie' @@ -128,7 +130,7 @@ class WebPushAgent notificationType: Notification[type], subject: payload.subject, message, - image: payload.image, + image: embedImage ? payload.image : undefined, requestId: payload.request?.id, actionUrl, actionUrlTitle, diff --git a/server/lib/settings/index.ts b/server/lib/settings/index.ts index 60e4769d86..e50e154fb8 100644 --- a/server/lib/settings/index.ts +++ b/server/lib/settings/index.ts @@ -207,6 +207,7 @@ interface FullPublicSettings extends PublicSettings { export interface NotificationAgentConfig { enabled: boolean; + embedImage: boolean; types?: number; options: Record; } @@ -434,6 +435,7 @@ class Settings { agents: { email: { enabled: false, + embedImage: true, options: { userEmailRequired: false, emailFrom: '', @@ -448,6 +450,7 @@ class Settings { }, discord: { enabled: false, + embedImage: true, types: 0, options: { webhookUrl: '', @@ -457,6 +460,7 @@ class Settings { }, slack: { enabled: false, + embedImage: true, types: 0, options: { webhookUrl: '', @@ -464,6 +468,7 @@ class Settings { }, telegram: { enabled: false, + embedImage: true, types: 0, options: { botAPI: '', @@ -474,6 +479,7 @@ class Settings { }, pushbullet: { enabled: false, + embedImage: false, types: 0, options: { accessToken: '', @@ -481,6 +487,7 @@ class Settings { }, pushover: { enabled: false, + embedImage: true, types: 0, options: { accessToken: '', @@ -490,6 +497,7 @@ class Settings { }, webhook: { enabled: false, + embedImage: true, types: 0, options: { webhookUrl: '', @@ -499,10 +507,12 @@ class Settings { }, webpush: { enabled: false, + embedImage: true, options: {}, }, gotify: { enabled: false, + embedImage: false, types: 0, options: { url: '', diff --git a/server/routes/settings/notifications.ts b/server/routes/settings/notifications.ts index cee96b7d7b..9914928098 100644 --- a/server/routes/settings/notifications.ts +++ b/server/routes/settings/notifications.ts @@ -270,6 +270,7 @@ notificationRoutes.get('/webhook', (_req, res) => { const response: typeof webhookSettings = { enabled: webhookSettings.enabled, + embedImage: webhookSettings.embedImage, types: webhookSettings.types, options: { ...webhookSettings.options, @@ -291,6 +292,7 @@ notificationRoutes.post('/webhook', async (req, res, next) => { settings.notifications.agents.webhook = { enabled: req.body.enabled, + embedImage: req.body.embedImage, types: req.body.types, options: { jsonPayload: Buffer.from(req.body.options.jsonPayload).toString( @@ -321,6 +323,7 @@ notificationRoutes.post('/webhook/test', async (req, res, next) => { const testBody = { enabled: req.body.enabled, + embedImage: req.body.embedImage, types: req.body.types, options: { jsonPayload: Buffer.from(req.body.options.jsonPayload).toString( diff --git a/server/templates/email/media-request/html.pug b/server/templates/email/media-request/html.pug index 334095dfe2..cd698c205b 100644 --- a/server/templates/email/media-request/html.pug +++ b/server/templates/email/media-request/html.pug @@ -53,10 +53,11 @@ div(style='display: block; background-color: #111827; padding: 2.5rem 0;') b(style='color: #9ca3af; font-weight: 700;') | #{extra.name}  | #{extra.value} - td(rowspan='2' style='width: 7rem;') - a(style='display: block; width: 7rem; overflow: hidden; border-radius: .375rem;' href=actionUrl) - div(style='overflow: hidden; box-sizing: border-box; margin: 0px;') - img(alt='' src=imageUrl style='box-sizing: border-box; padding: 0px; border: none; margin: auto; display: block; min-width: 100%; max-width: 100%; min-height: 100%; max-height: 100%;') + if imageUrl + td(rowspan='2' style='width: 7rem;') + a(style='display: block; width: 7rem; overflow: hidden; border-radius: .375rem;' href=actionUrl) + div(style='overflow: hidden; box-sizing: border-box; margin: 0px;') + img(alt='' src=imageUrl style='box-sizing: border-box; padding: 0px; border: none; margin: auto; display: block; min-width: 100%; max-width: 100%; min-height: 100%; max-height: 100%;') tr td(style='font-size: .85em; color: #9ca3af; line-height: 1em; vertical-align: bottom; margin-right: 1rem') span diff --git a/src/components/Settings/Notifications/NotificationsDiscord.tsx b/src/components/Settings/Notifications/NotificationsDiscord.tsx index 6abea6a2b8..b40b39c8ac 100644 --- a/src/components/Settings/Notifications/NotificationsDiscord.tsx +++ b/src/components/Settings/Notifications/NotificationsDiscord.tsx @@ -15,6 +15,7 @@ import * as Yup from 'yup'; const messages = defineMessages('components.Settings.Notifications', { agentenabled: 'Enable Agent', + embedImage: 'Embed Image', botUsername: 'Bot Username', botAvatarUrl: 'Bot Avatar URL', webhookUrl: 'Webhook URL', @@ -74,6 +75,7 @@ const NotificationsDiscord = () => { { +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
From a013b1c4b659b5577ebe394f881bc50abf6a580e Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Tue, 18 Feb 2025 00:04:48 +0530 Subject: [PATCH 2/7] fix(notifications): added en i18n config --- src/i18n/locale/en.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json index 0049d4d750..a9e9e1e2b3 100644 --- a/src/i18n/locale/en.json +++ b/src/i18n/locale/en.json @@ -654,6 +654,7 @@ "components.Settings.Notifications.NotificationsPushover.accessTokenTip": "Register an application for use with Jellyseerr", "components.Settings.Notifications.NotificationsPushover.agentenabled": "Enable Agent", "components.Settings.Notifications.NotificationsPushover.deviceDefault": "Device Default", + "components.Settings.Notifications.NotificationsPushover.embedImage": "Embed Image", "components.Settings.Notifications.NotificationsPushover.pushoversettingsfailed": "Pushover notification settings failed to save.", "components.Settings.Notifications.NotificationsPushover.pushoversettingssaved": "Pushover notification settings saved successfully!", "components.Settings.Notifications.NotificationsPushover.sound": "Notification Sound", @@ -666,6 +667,7 @@ "components.Settings.Notifications.NotificationsPushover.validationTypes": "You must select at least one notification type", "components.Settings.Notifications.NotificationsPushover.validationUserTokenRequired": "You must provide a valid user or group key", "components.Settings.Notifications.NotificationsSlack.agentenabled": "Enable Agent", + "components.Settings.Notifications.NotificationsSlack.embedImage": "Embed Image", "components.Settings.Notifications.NotificationsSlack.slacksettingsfailed": "Slack notification settings failed to save.", "components.Settings.Notifications.NotificationsSlack.slacksettingssaved": "Slack notification settings saved successfully!", "components.Settings.Notifications.NotificationsSlack.toastSlackTestFailed": "Slack test notification failed to send.", @@ -691,6 +693,7 @@ "components.Settings.Notifications.NotificationsWebhook.webhooksettingsfailed": "Webhook notification settings failed to save.", "components.Settings.Notifications.NotificationsWebhook.webhooksettingssaved": "Webhook notification settings saved successfully!", "components.Settings.Notifications.NotificationsWebPush.agentenabled": "Enable Agent", + "components.Settings.Notifications.NotificationsWebPush.embedImage": "Embed Image", "components.Settings.Notifications.NotificationsWebPush.httpsRequirement": "In order to receive web push notifications, Jellyseerr must be served over HTTPS.", "components.Settings.Notifications.NotificationsWebPush.toastWebPushTestFailed": "Web push test notification failed to send.", "components.Settings.Notifications.NotificationsWebPush.toastWebPushTestSending": "Sending web push test notification…", @@ -713,6 +716,7 @@ "components.Settings.Notifications.emailsender": "Sender Address", "components.Settings.Notifications.emailsettingsfailed": "Email notification settings failed to save.", "components.Settings.Notifications.emailsettingssaved": "Email notification settings saved successfully!", + "components.Settings.Notifications.embedImage": "Embed Image", "components.Settings.Notifications.enableMentions": "Enable Mentions", "components.Settings.Notifications.encryption": "Encryption Method", "components.Settings.Notifications.encryptionDefault": "Use STARTTLS if available", From a62a8d4538877a23807f026b87637e2fc1473145 Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Tue, 8 Apr 2025 22:53:29 +0530 Subject: [PATCH 3/7] fix: prettify --- .../Settings/Notifications/NotificationsEmail.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx index cf36281120..049a272b5b 100644 --- a/src/components/Settings/Notifications/NotificationsEmail.tsx +++ b/src/components/Settings/Notifications/NotificationsEmail.tsx @@ -131,10 +131,10 @@ const NotificationsEmail = () => { encryption: data.options.secure ? 'implicit' : data.options.requireTls - ? 'opportunistic' - : data.options.ignoreTls - ? 'none' - : 'default', + ? 'opportunistic' + : data.options.ignoreTls + ? 'none' + : 'default', authUser: data.options.authUser, authPass: data.options.authPass, allowSelfSigned: data.options.allowSelfSigned, From 49e84267ce31c5ea1c2a7c5bd3cb77457e7ded32 Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Sun, 11 May 2025 07:30:59 +0530 Subject: [PATCH 4/7] fix(notifications): added embedImage support for ntfy --- server/lib/notifications/agents/ntfy.ts | 6 ++++-- server/lib/settings/index.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/lib/notifications/agents/ntfy.ts b/server/lib/notifications/agents/ntfy.ts index 005e9aa156..62dd623545 100644 --- a/server/lib/notifications/agents/ntfy.ts +++ b/server/lib/notifications/agents/ntfy.ts @@ -22,7 +22,9 @@ class NtfyAgent } private buildPayload(type: Notification, payload: NotificationPayload) { - const { applicationUrl } = getSettings().main; + const settings = getSettings(); + const { applicationUrl } = settings.main; + const { embedImage } = settings.notifications.agents.ntfy; const topic = this.getSettings().options.topic; const priority = 3; @@ -72,7 +74,7 @@ class NtfyAgent message += `\n\n**${extra.name}**\n${extra.value}`; } - const attach = payload.image; + const attach = embedImage ? payload.image : undefined; let click; if (applicationUrl && payload.media) { diff --git a/server/lib/settings/index.ts b/server/lib/settings/index.ts index e50e154fb8..bb512775c9 100644 --- a/server/lib/settings/index.ts +++ b/server/lib/settings/index.ts @@ -522,6 +522,7 @@ class Settings { }, ntfy: { enabled: false, + embedImage: false, types: 0, options: { url: '', From 45feac71b60c621a0d683493f45ee92edc0c156d Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Sun, 11 May 2025 07:50:43 +0530 Subject: [PATCH 5/7] fix(frontend): update embedImage on form state change and submission --- .../Settings/Notifications/NotificationsDiscord.tsx | 2 ++ .../Settings/Notifications/NotificationsEmail.tsx | 2 ++ .../Notifications/NotificationsNtfy/index.tsx | 11 +++++++++++ .../Notifications/NotificationsPushover/index.tsx | 2 ++ .../Notifications/NotificationsSlack/index.tsx | 2 ++ .../Settings/Notifications/NotificationsTelegram.tsx | 1 + 6 files changed, 20 insertions(+) diff --git a/src/components/Settings/Notifications/NotificationsDiscord.tsx b/src/components/Settings/Notifications/NotificationsDiscord.tsx index b40b39c8ac..bad091f8e8 100644 --- a/src/components/Settings/Notifications/NotificationsDiscord.tsx +++ b/src/components/Settings/Notifications/NotificationsDiscord.tsx @@ -88,6 +88,7 @@ const NotificationsDiscord = () => { try { await axios.post('/api/v1/settings/notifications/discord', { enabled: values.enabled, + embedImage: values.embedImage, types: values.types, options: { botUsername: values.botUsername, @@ -137,6 +138,7 @@ const NotificationsDiscord = () => { ); await axios.post('/api/v1/settings/notifications/discord/test', { enabled: true, + embedImage: values.embedImage, types: values.types, options: { botUsername: values.botUsername, diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx index 049a272b5b..8e63ff9404 100644 --- a/src/components/Settings/Notifications/NotificationsEmail.tsx +++ b/src/components/Settings/Notifications/NotificationsEmail.tsx @@ -147,6 +147,7 @@ const NotificationsEmail = () => { try { await axios.post('/api/v1/settings/notifications/email', { enabled: values.enabled, + embedImage: values.embedImage, options: { userEmailRequired: values.userEmailRequired, emailFrom: values.emailFrom, @@ -196,6 +197,7 @@ const NotificationsEmail = () => { ); await axios.post('/api/v1/settings/notifications/email/test', { enabled: true, + embedImage: values.embedImage, options: { emailFrom: values.emailFrom, smtpHost: values.smtpHost, diff --git a/src/components/Settings/Notifications/NotificationsNtfy/index.tsx b/src/components/Settings/Notifications/NotificationsNtfy/index.tsx index 85fa943b99..943071b6ee 100644 --- a/src/components/Settings/Notifications/NotificationsNtfy/index.tsx +++ b/src/components/Settings/Notifications/NotificationsNtfy/index.tsx @@ -19,6 +19,7 @@ const messages = defineMessages( 'components.Settings.Notifications.NotificationsNtfy', { agentenabled: 'Enable Agent', + embedImage: 'Embed Image', url: 'Server root URL', topic: 'Topic', usernamePasswordAuth: 'Username + Password authentication', @@ -80,6 +81,7 @@ const NotificationsNtfy = () => { { try { await axios.post('/api/v1/settings/notifications/ntfy', { enabled: values.enabled, + embedImage: values.embedImage, types: values.types, options: { url: values.url, @@ -188,6 +191,14 @@ const NotificationsNtfy = () => {
+
+ +
+ +
+
-
diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx index 8e63ff9404..d88906a517 100644 --- a/src/components/Settings/Notifications/NotificationsEmail.tsx +++ b/src/components/Settings/Notifications/NotificationsEmail.tsx @@ -17,7 +17,7 @@ const messages = defineMessages('components.Settings.Notifications', { validationSmtpHostRequired: 'You must provide a valid hostname or IP address', validationSmtpPortRequired: 'You must provide a valid port number', agentenabled: 'Enable Agent', - embedImage: 'Embed Image', + embedPoster: 'Embed Poster', userEmailRequired: 'Require user email', emailsender: 'Sender Address', smtpHost: 'SMTP Host', @@ -123,7 +123,7 @@ const NotificationsEmail = () => { { try { await axios.post('/api/v1/settings/notifications/email', { enabled: values.enabled, - embedImage: values.embedImage, + embedPoster: values.embedPoster, options: { userEmailRequired: values.userEmailRequired, emailFrom: values.emailFrom, @@ -197,7 +197,7 @@ const NotificationsEmail = () => { ); await axios.post('/api/v1/settings/notifications/email/test', { enabled: true, - embedImage: values.embedImage, + embedPoster: values.embedPoster, options: { emailFrom: values.emailFrom, smtpHost: values.smtpHost, @@ -246,11 +246,11 @@ const NotificationsEmail = () => {
-
diff --git a/src/components/Settings/Notifications/NotificationsNtfy/index.tsx b/src/components/Settings/Notifications/NotificationsNtfy/index.tsx index 943071b6ee..0866c17441 100644 --- a/src/components/Settings/Notifications/NotificationsNtfy/index.tsx +++ b/src/components/Settings/Notifications/NotificationsNtfy/index.tsx @@ -19,7 +19,7 @@ const messages = defineMessages( 'components.Settings.Notifications.NotificationsNtfy', { agentenabled: 'Enable Agent', - embedImage: 'Embed Image', + embedPoster: 'Embed Poster', url: 'Server root URL', topic: 'Topic', usernamePasswordAuth: 'Username + Password authentication', @@ -81,7 +81,7 @@ const NotificationsNtfy = () => { { try { await axios.post('/api/v1/settings/notifications/ntfy', { enabled: values.enabled, - embedImage: values.embedImage, + embedPoster: values.embedPoster, types: values.types, options: { url: values.url, @@ -192,11 +192,11 @@ const NotificationsNtfy = () => {
-
diff --git a/src/components/Settings/Notifications/NotificationsPushover/index.tsx b/src/components/Settings/Notifications/NotificationsPushover/index.tsx index 816276debb..f9e222345d 100644 --- a/src/components/Settings/Notifications/NotificationsPushover/index.tsx +++ b/src/components/Settings/Notifications/NotificationsPushover/index.tsx @@ -17,7 +17,7 @@ const messages = defineMessages( 'components.Settings.Notifications.NotificationsPushover', { agentenabled: 'Enable Agent', - embedImage: 'Embed Image', + embedPoster: 'Embed Poster', accessToken: 'Application API Token', accessTokenTip: 'Register an application for use with Jellyseerr', @@ -87,7 +87,7 @@ const NotificationsPushover = () => { { try { await axios.post('/api/v1/settings/notifications/pushover', { enabled: values.enabled, - embedImage: values.embedImage, + embedPoster: values.embedPoster, types: values.types, options: { accessToken: values.accessToken, @@ -145,7 +145,7 @@ const NotificationsPushover = () => { ); await axios.post('/api/v1/settings/notifications/pushover/test', { enabled: true, - embedImage: values.embedImage, + embedPoster: values.embedPoster, types: values.types, options: { accessToken: values.accessToken, @@ -186,11 +186,11 @@ const NotificationsPushover = () => {
-
diff --git a/src/components/Settings/Notifications/NotificationsSlack/index.tsx b/src/components/Settings/Notifications/NotificationsSlack/index.tsx index 636dc408d1..bca6765985 100644 --- a/src/components/Settings/Notifications/NotificationsSlack/index.tsx +++ b/src/components/Settings/Notifications/NotificationsSlack/index.tsx @@ -16,7 +16,7 @@ const messages = defineMessages( 'components.Settings.Notifications.NotificationsSlack', { agentenabled: 'Enable Agent', - embedImage: 'Embed Image', + embedPoster: 'Embed Poster', webhookUrl: 'Webhook URL', webhookUrlTip: 'Create an Incoming Webhook integration', @@ -60,7 +60,7 @@ const NotificationsSlack = () => { { try { await axios.post('/api/v1/settings/notifications/slack', { enabled: values.enabled, - embedImage: values.embedImage, + embedPoster: values.embedPoster, types: values.types, options: { webhookUrl: values.webhookUrl, @@ -114,7 +114,7 @@ const NotificationsSlack = () => { ); await axios.post('/api/v1/settings/notifications/slack/test', { enabled: true, - embedImage: values.embedImage, + embedPoster: values.embedPoster, types: values.types, options: { webhookUrl: values.webhookUrl, @@ -153,11 +153,11 @@ const NotificationsSlack = () => {
-
diff --git a/src/components/Settings/Notifications/NotificationsTelegram.tsx b/src/components/Settings/Notifications/NotificationsTelegram.tsx index 63f71eb4d0..35c8c16158 100644 --- a/src/components/Settings/Notifications/NotificationsTelegram.tsx +++ b/src/components/Settings/Notifications/NotificationsTelegram.tsx @@ -15,7 +15,7 @@ import * as Yup from 'yup'; const messages = defineMessages('components.Settings.Notifications', { agentenabled: 'Enable Agent', - embedImage: 'Embed Image', + embedPoster: 'Embed Poster', botUsername: 'Bot Username', botUsernameTip: 'Allow users to also start a chat with your bot and configure their own notifications', @@ -90,7 +90,7 @@ const NotificationsTelegram = () => { { try { await axios.post('/api/v1/settings/notifications/telegram', { enabled: values.enabled, - embedImage: values.embedImage, + embedPoster: values.embedPoster, types: values.types, options: { botAPI: values.botAPI, @@ -195,11 +195,11 @@ const NotificationsTelegram = () => {
-
diff --git a/src/components/Settings/Notifications/NotificationsWebPush/index.tsx b/src/components/Settings/Notifications/NotificationsWebPush/index.tsx index df1b8aadc0..bab7015bb8 100644 --- a/src/components/Settings/Notifications/NotificationsWebPush/index.tsx +++ b/src/components/Settings/Notifications/NotificationsWebPush/index.tsx @@ -15,7 +15,7 @@ const messages = defineMessages( 'components.Settings.Notifications.NotificationsWebPush', { agentenabled: 'Enable Agent', - embedImage: 'Embed Image', + embedPoster: 'Embed Poster', webpushsettingssaved: 'Web push notification settings saved successfully!', webpushsettingsfailed: 'Web push notification settings failed to save.', toastWebPushTestSending: 'Sending web push test notification…', @@ -56,13 +56,13 @@ const NotificationsWebPush = () => { { try { await axios.post('/api/v1/settings/notifications/webpush', { enabled: values.enabled, - embedImage: values.embedImage, + embedPoster: values.embedPoster, options: {}, }); mutate('/api/v1/settings/public'); @@ -97,7 +97,7 @@ const NotificationsWebPush = () => { ); await axios.post('/api/v1/settings/notifications/webpush/test', { enabled: true, - embedImage: values.embedImage, + embedPoster: values.embedPoster, options: {}, }); @@ -133,12 +133,12 @@ const NotificationsWebPush = () => {
-
diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json index a7ba1795df..63a207c177 100644 --- a/src/i18n/locale/en.json +++ b/src/i18n/locale/en.json @@ -624,7 +624,7 @@ "components.Settings.Notifications.NotificationsGotify.validationUrlRequired": "You must provide a valid URL", "components.Settings.Notifications.NotificationsGotify.validationUrlTrailingSlash": "URL must not end in a trailing slash", "components.Settings.Notifications.NotificationsNtfy.agentenabled": "Enable Agent", - "components.Settings.Notifications.NotificationsNtfy.embedImage": "Embed Image", + "components.Settings.Notifications.NotificationsNtfy.embedPoster": "Embed Poster", "components.Settings.Notifications.NotificationsNtfy.ntfysettingsfailed": "Ntfy notification settings failed to save.", "components.Settings.Notifications.NotificationsNtfy.ntfysettingssaved": "Ntfy notification settings saved successfully!", "components.Settings.Notifications.NotificationsNtfy.password": "Password", @@ -655,7 +655,7 @@ "components.Settings.Notifications.NotificationsPushover.accessTokenTip": "Register an application for use with Jellyseerr", "components.Settings.Notifications.NotificationsPushover.agentenabled": "Enable Agent", "components.Settings.Notifications.NotificationsPushover.deviceDefault": "Device Default", - "components.Settings.Notifications.NotificationsPushover.embedImage": "Embed Image", + "components.Settings.Notifications.NotificationsPushover.embedPoster": "Embed Poster", "components.Settings.Notifications.NotificationsPushover.pushoversettingsfailed": "Pushover notification settings failed to save.", "components.Settings.Notifications.NotificationsPushover.pushoversettingssaved": "Pushover notification settings saved successfully!", "components.Settings.Notifications.NotificationsPushover.sound": "Notification Sound", @@ -668,7 +668,7 @@ "components.Settings.Notifications.NotificationsPushover.validationTypes": "You must select at least one notification type", "components.Settings.Notifications.NotificationsPushover.validationUserTokenRequired": "You must provide a valid user or group key", "components.Settings.Notifications.NotificationsSlack.agentenabled": "Enable Agent", - "components.Settings.Notifications.NotificationsSlack.embedImage": "Embed Image", + "components.Settings.Notifications.NotificationsSlack.embedPoster": "Embed Poster", "components.Settings.Notifications.NotificationsSlack.slacksettingsfailed": "Slack notification settings failed to save.", "components.Settings.Notifications.NotificationsSlack.slacksettingssaved": "Slack notification settings saved successfully!", "components.Settings.Notifications.NotificationsSlack.toastSlackTestFailed": "Slack test notification failed to send.", @@ -694,7 +694,7 @@ "components.Settings.Notifications.NotificationsWebhook.webhooksettingsfailed": "Webhook notification settings failed to save.", "components.Settings.Notifications.NotificationsWebhook.webhooksettingssaved": "Webhook notification settings saved successfully!", "components.Settings.Notifications.NotificationsWebPush.agentenabled": "Enable Agent", - "components.Settings.Notifications.NotificationsWebPush.embedImage": "Embed Image", + "components.Settings.Notifications.NotificationsWebPush.embedPoster": "Embed Poster", "components.Settings.Notifications.NotificationsWebPush.httpsRequirement": "In order to receive web push notifications, Jellyseerr must be served over HTTPS.", "components.Settings.Notifications.NotificationsWebPush.toastWebPushTestFailed": "Web push test notification failed to send.", "components.Settings.Notifications.NotificationsWebPush.toastWebPushTestSending": "Sending web push test notification…", @@ -717,7 +717,7 @@ "components.Settings.Notifications.emailsender": "Sender Address", "components.Settings.Notifications.emailsettingsfailed": "Email notification settings failed to save.", "components.Settings.Notifications.emailsettingssaved": "Email notification settings saved successfully!", - "components.Settings.Notifications.embedImage": "Embed Image", + "components.Settings.Notifications.embedPoster": "Embed Poster", "components.Settings.Notifications.enableMentions": "Enable Mentions", "components.Settings.Notifications.encryption": "Encryption Method", "components.Settings.Notifications.encryptionDefault": "Use STARTTLS if available", @@ -1163,6 +1163,7 @@ "components.Settings.menuServices": "Services", "components.Settings.menuUsers": "Users", "components.Settings.metadataProviderSelection": "Metadata Provider Selection", + "components.Settings.metadataProviderSettings": "Metadata Providers", "components.Settings.metadataSettings": "Settings for metadata provider", "components.Settings.metadataSettingsSaved": "Metadata provider settings saved", "components.Settings.no": "No",