mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-26 19:34:04 +01:00
Add ability for poll author to terminate a poll
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user