Add ability for poll author to terminate a poll

This commit is contained in:
yash-signal
2025-11-10 13:18:31 -06:00
committed by GitHub
parent 30548a6a3c
commit d328b45a28
39 changed files with 897 additions and 89 deletions

View File

@@ -521,6 +521,25 @@ export function getNotificationDataForMessage(
};
}
const { pollTerminateNotification } = attributes;
if (pollTerminateNotification) {
const sender = findAndFormatContact(attributes.sourceServiceId);
const text = sender.isMe
? i18n('icu:PollTerminate--you', {
poll: pollTerminateNotification.question,
})
: i18n('icu:PollTerminate--other', {
name: sender.title,
poll: pollTerminateNotification.question,
});
return {
emoji: '📊',
text,
};
}
if (body) {
return {
text: body,