refs #1281 Create notification when receive emoji reaction in web socket
This commit is contained in:
parent
b030109f75
commit
aacb1437cb
|
@ -12,7 +12,8 @@ const state = (): NotificationState => {
|
|||
reply: true,
|
||||
reblog: true,
|
||||
favourite: true,
|
||||
follow: true
|
||||
follow: true,
|
||||
reaction: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,8 @@ describe('Preferences/Notification', () => {
|
|||
reply: true,
|
||||
reblog: true,
|
||||
favourite: true,
|
||||
follow: true
|
||||
follow: true,
|
||||
reaction: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -45,7 +45,8 @@ const notify: Notify = {
|
|||
reply: true,
|
||||
reblog: true,
|
||||
favourite: true,
|
||||
follow: true
|
||||
follow: true,
|
||||
reaction: true
|
||||
}
|
||||
|
||||
const language: LanguageSet = {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -16,7 +16,8 @@ const state: NotificationState = {
|
|||
reply: true,
|
||||
reblog: true,
|
||||
favourite: true,
|
||||
follow: true
|
||||
follow: true,
|
||||
reaction: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
export type Notify = {
|
||||
reply: boolean,
|
||||
reblog: boolean,
|
||||
favourite: boolean,
|
||||
reply: boolean
|
||||
reblog: boolean
|
||||
favourite: boolean
|
||||
follow: boolean
|
||||
reaction: boolean
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue