diff --git a/spec/renderer/integration/store/Preferences/Notification.spec.ts b/spec/renderer/integration/store/Preferences/Notification.spec.ts index 00794537..7e519641 100644 --- a/spec/renderer/integration/store/Preferences/Notification.spec.ts +++ b/spec/renderer/integration/store/Preferences/Notification.spec.ts @@ -12,7 +12,8 @@ const state = (): NotificationState => { reply: true, reblog: true, favourite: true, - follow: true + follow: true, + reaction: true } } } @@ -58,7 +59,8 @@ describe('Preferences/Notification', () => { reply: false, reblog: false, favourite: false, - follow: false + follow: false, + reaction: false } } }) @@ -70,7 +72,8 @@ describe('Preferences/Notification', () => { reply: false, reblog: false, favourite: false, - follow: false + follow: false, + reaction: false } }) }) @@ -93,7 +96,8 @@ describe('Preferences/Notification', () => { reply: false, reblog: false, favourite: true, - follow: true + follow: true, + reaction: true } }) expect(App.actions.loadPreferences).toBeCalled() diff --git a/spec/renderer/unit/store/Preferences/Notification.spec.ts b/spec/renderer/unit/store/Preferences/Notification.spec.ts index 2c05f177..797785d8 100644 --- a/spec/renderer/unit/store/Preferences/Notification.spec.ts +++ b/spec/renderer/unit/store/Preferences/Notification.spec.ts @@ -9,7 +9,8 @@ describe('Preferences/Notification', () => { reply: true, reblog: true, favourite: true, - follow: true + follow: true, + reaction: true } } } diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json index b3afe2d8..ef453ae5 100644 --- a/src/config/locales/en/translation.json +++ b/src/config/locales/en/translation.json @@ -179,7 +179,8 @@ "reply": "Notify me when I receive a reply", "reblog": "Notify me when I receive a reblog", "favourite": "Notify me when I receive a favourite", - "follow": "Notify me when I receive a follow" + "follow": "Notify me when I receive a follow", + "reaction": "Notify me when I receive a emoji reaction" } }, "account": { @@ -453,6 +454,10 @@ "reblog": { "title": "Reblog", "body": "{{username}} boosted your status" + }, + "reaction": { + "title": "Reaction", + "body": "{{username}} reacted your status" } } } diff --git a/src/main/index.ts b/src/main/index.ts index 08bdad2c..d97e042c 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1442,6 +1442,15 @@ const createNotification = (notification: Entity.Notification, notifyConfig: Not } as NotificationConstructorOptions } break + case 'emoji_reaction': + if (notifyConfig.reaction) { + return { + title: i18next.t('notification.reaction.title'), + body: i18next.t('notification.reaction.body', { username: username(notification.account) }), + silent: false + } as NotificationConstructorOptions + } + break default: break } diff --git a/src/main/preferences.ts b/src/main/preferences.ts index 1eef83e8..209d7917 100644 --- a/src/main/preferences.ts +++ b/src/main/preferences.ts @@ -45,7 +45,8 @@ const notify: Notify = { reply: true, reblog: true, favourite: true, - follow: true + follow: true, + reaction: true } const language: LanguageSet = { diff --git a/src/renderer/components/Preferences/Notification.vue b/src/renderer/components/Preferences/Notification.vue index 831407e1..0370ed41 100644 --- a/src/renderer/components/Preferences/Notification.vue +++ b/src/renderer/components/Preferences/Notification.vue @@ -1,37 +1,25 @@ diff --git a/src/renderer/components/organisms/Notification/Favourite.vue b/src/renderer/components/organisms/Notification/Favourite.vue index 0defc936..d18727f3 100644 --- a/src/renderer/components/organisms/Notification/Favourite.vue +++ b/src/renderer/components/organisms/Notification/Favourite.vue @@ -18,7 +18,8 @@
- favourited your status + {{ $t('notification.favourite.body') }}
- is now following you + {{ $t('notification.follow.body') }}
- reacted to your status + {{ $t('notification.reaction.body') }}
- boosted your status + {{ $t('notification.reblog.body') }}