Add chat fixes (#6682)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-09-23 13:36:08 +07:00
committed by GitHub
parent 4bdfaaa28e
commit bbe2e4e9ce
10 changed files with 62 additions and 29 deletions
@@ -78,7 +78,7 @@ import serverNotification, {
SenderInfo
} from '@hcengineering/server-notification'
import serverView from '@hcengineering/server-view'
import { markupToHTML, markupToText, stripTags } from '@hcengineering/text'
import { markupToText, stripTags } from '@hcengineering/text'
import { encodeObjectURI } from '@hcengineering/view'
import { workbenchId } from '@hcengineering/workbench'
import webpush, { WebPushError } from 'web-push'
@@ -240,8 +240,10 @@ export async function getContentByTemplate (
notificationData !== undefined &&
control.hierarchy.isDerived(notificationData._class, notification.class.MentionInboxNotification)
) {
const text = (notificationData as MentionInboxNotification).messageHtml
params.body = text !== undefined ? markupToHTML(text) : params.body
const messageContent = (notificationData as MentionInboxNotification).messageHtml
const text = messageContent !== undefined ? markupToText(messageContent) : undefined
params.body = text ?? params.body
params.message = text ?? params.message
}
if (message !== undefined) {