refs #1281 Create notification when receive emoji reaction in web socket

This commit is contained in:
AkiraFukushima 2020-04-25 21:25:28 +09:00
parent b030109f75
commit aacb1437cb
7 changed files with 23 additions and 8 deletions

View File

@ -12,7 +12,8 @@ const state = (): NotificationState => {
reply: true,
reblog: true,
favourite: true,
follow: true
follow: true,
reaction: true
}
}
}

View File

@ -9,7 +9,8 @@ describe('Preferences/Notification', () => {
reply: true,
reblog: true,
favourite: true,
follow: true
follow: true,
reaction: true
}
}
}

View File

@ -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
}

View File

@ -45,7 +45,8 @@ const notify: Notify = {
reply: true,
reblog: true,
favourite: true,
follow: true
follow: true,
reaction: true
}
const language: LanguageSet = {

View File

@ -39,7 +39,8 @@ const state = (): AppState => ({
reply: true,
reblog: true,
favourite: true,
follow: true
follow: true,
reaction: true
},
tootPadding: 8,
timeFormat: TimeFormat.Absolute.value,

View File

@ -16,7 +16,8 @@ const state: NotificationState = {
reply: true,
reblog: true,
favourite: true,
follow: true
follow: true,
reaction: true
}
}
}

View File

@ -1,6 +1,7 @@
export type Notify = {
reply: boolean,
reblog: boolean,
favourite: boolean,
reply: boolean
reblog: boolean
favourite: boolean
follow: boolean
reaction: boolean
}