Add message preview for polls

This commit is contained in:
yash-signal
2025-10-27 17:52:56 -05:00
committed by GitHub
parent 39081785d4
commit 4fc8560103
2 changed files with 15 additions and 0 deletions

View File

@@ -510,6 +510,17 @@ export function getNotificationDataForMessage(
};
}
const { poll } = attributes;
if (poll) {
return {
emoji: '📊',
text: i18n('icu:message--getNotificationText--poll', {
pollQuestion: poll.question,
}),
bodyRanges,
};
}
if (body) {
return {
text: body,