Show full mention message in email and telegram (#6473)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-09-09 22:14:23 +07:00
committed by GitHub
parent fe8bf16e77
commit 04e93939f6
2 changed files with 19 additions and 3 deletions
+10 -2
View File
@@ -30,8 +30,13 @@ import {
TxProcessor
} from '@hcengineering/core'
import { TriggerControl } from '@hcengineering/server-core'
import notification, {
BaseNotificationType,
InboxNotification,
MentionInboxNotification,
NotificationType
} from '@hcengineering/notification'
import telegram, { TelegramMessage, TelegramNotificationRequest } from '@hcengineering/telegram'
import { BaseNotificationType, InboxNotification, NotificationType } from '@hcengineering/notification'
import setting, { Integration } from '@hcengineering/setting'
import { NotificationProviderFunc, ReceiverInfo, SenderInfo } from '@hcengineering/server-notification'
import { getMetadata, getResource, translate } from '@hcengineering/platform'
@@ -196,7 +201,10 @@ async function getTranslatedData (
let { title, body } = await getTranslatedNotificationContent(data, data._class, control)
let quote: string | undefined
if (data.data !== undefined) {
if (hierarchy.isDerived(data._class, notification.class.MentionInboxNotification)) {
const text = (data as MentionInboxNotification).messageHtml
body = text !== undefined ? markupToHTML(text) : body
} else if (data.data !== undefined) {
body = markupToHTML(data.data)
} else if (message !== undefined) {
const html = await activityMessageToHtml(control, message)