diff --git a/src/webpage/notificationHandler.ts b/src/webpage/notificationHandler.ts index b7496ee..5a33c1f 100644 --- a/src/webpage/notificationHandler.ts +++ b/src/webpage/notificationHandler.ts @@ -20,6 +20,17 @@ export class NotificationHandler { noticontent ||= message.embeds[0]?.json.title; noticontent ||= message.content.textContent; } + if (message.attachments.length > 0) { + noticontent ||= I18n.sentAttachment(); + } + if (message.poll) { + noticontent ||= I18n.sentPoll(); + } + if (message.stickers.length > 0) { + noticontent ||= I18n.sentSticker(); + } + // exhausted all options, sorry, we just send the raw thing! + noticontent ||= message.content.rawString; noticontent ||= I18n.blankMessage(); const image = message.getimages()[0]; diff --git a/translations/en.json b/translations/en.json index 11b7273..4c2cadf 100644 --- a/translations/en.json +++ b/translations/en.json @@ -117,6 +117,9 @@ }, "bio": "Bio:", "blankMessage": "Blank message", + "sentAttachment": "Sent an attachment", + "sentPoll": "Sent a poll", + "sentSticker": "Sent a sticker", "blog": { "blog": "Blog", "blogUpdates": "Get blog updates when you open the app:", diff --git a/translations/qqq.json b/translations/qqq.json index 9eb1ea0..5c7334b 100644 --- a/translations/qqq.json +++ b/translations/qqq.json @@ -119,6 +119,9 @@ }, "bio": "Label for the bio/about-me text field in user settings.", "blankMessage": "Placeholder text shown when a message has no content.", + "sentAttachment": "Notification message when someone sends an attachment", + "sentPoll": "Notification message when someone sends a poll", + "sentSticker": "Notification message when someone sends a sticker", "blog": { "blog": "Settings section title for the blog feature.", "blogUpdates": "Label for the toggle to enable/disable blog update notifications.",