mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(notif): add Pushbullet channel tag (#2198)
* feat(notif): add pushbullet channel tag to server notif settings * feat(notif): suggested changes * docs(notif): add pushbullet channel tag
This commit is contained in:

committed by
GitHub

parent
eb9ca2e86f
commit
f9200b7977
@@ -19,6 +19,7 @@ interface PushbulletPayload {
|
||||
type: string;
|
||||
title: string;
|
||||
body: string;
|
||||
channel_tag?: string;
|
||||
}
|
||||
|
||||
class PushbulletAgent
|
||||
@@ -116,11 +117,15 @@ class PushbulletAgent
|
||||
});
|
||||
|
||||
try {
|
||||
await axios.post(endpoint, notificationPayload, {
|
||||
headers: {
|
||||
'Access-Token': settings.options.accessToken,
|
||||
},
|
||||
});
|
||||
await axios.post(
|
||||
endpoint,
|
||||
{ ...notificationPayload, channel_tag: settings.options.channelTag },
|
||||
{
|
||||
headers: {
|
||||
'Access-Token': settings.options.accessToken,
|
||||
},
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
logger.error('Error sending Pushbullet notification', {
|
||||
label: 'Notifications',
|
||||
@@ -188,8 +193,9 @@ class PushbulletAgent
|
||||
.map(async (user) => {
|
||||
if (
|
||||
user.settings?.pushbulletAccessToken &&
|
||||
user.settings.pushbulletAccessToken !==
|
||||
settings.options.accessToken
|
||||
(settings.options.channelTag ||
|
||||
user.settings.pushbulletAccessToken !==
|
||||
settings.options.accessToken)
|
||||
) {
|
||||
logger.debug('Sending Pushbullet notification', {
|
||||
label: 'Notifications',
|
||||
|
@@ -181,6 +181,7 @@ export interface NotificationAgentTelegram extends NotificationAgentConfig {
|
||||
export interface NotificationAgentPushbullet extends NotificationAgentConfig {
|
||||
options: {
|
||||
accessToken: string;
|
||||
channelTag?: string;
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user