fix nse: don't swap title->body for chat-reaction

This commit is contained in:
Samuel Newman
2026-05-19 16:58:50 +03:00
parent 826a0e6d02
commit ee8786943c
+7 -1
View File
@@ -44,7 +44,13 @@ class NotificationService: UNNotificationServiceExtension {
if reason == "chat-message" || reason == "chat-reaction" {
mutateWithChatMessage(bestAttempt)
mutateChatMessageBody(bestAttempt, userInfo: request.content.userInfo)
// Only apply the title->body swap for chat-message. For chat-reaction,
// `messageKind` refers to the reacted-to message, so we'd clobber the
// descriptive reaction body with the title for reactions on system
// messages.
if reason == "chat-message" {
mutateChatMessageBody(bestAttempt, userInfo: request.content.userInfo)
}
mutateWithGroupSubtitle(bestAttempt, userInfo: request.content.userInfo)
let finalContent = createCommunicationNotification(
from: bestAttempt,