Refactor server side notifications (#2327)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2022-10-26 17:24:39 +07:00
committed by GitHub
parent 70e00dbb5f
commit 3a8d1e2bcb
58 changed files with 539 additions and 400 deletions
+7 -1
View File
@@ -81,6 +81,9 @@ export class TEmaiNotification extends TDoc implements EmailNotification {
@Model(notification.class.NotificationType, core.class.Doc, DOMAIN_MODEL)
export class TNotificationType extends TDoc implements NotificationType {
label!: IntlString
textTemplate!: string
htmlTemplate!: string
subjectTemplate!: string
}
@Model(notification.class.NotificationProvider, core.class.Doc, DOMAIN_MODEL)
@@ -126,7 +129,10 @@ export function createModel (builder: Builder): void {
notification.class.NotificationType,
core.space.Model,
{
label: notification.string.MentionNotification
label: notification.string.MentionNotification,
textTemplate: '{sender} mentioned you in {doc} {data}',
htmlTemplate: '<p><b>{sender}</b> mentioned you in {doc}</p> {data}',
subjectTemplate: 'You was mentioned in {doc}'
},
notification.ids.MentionNotification
)