Skip to content

Commit 1f72036

Browse files
Fix notification push notifications not including the author's username (mastodon#32254)
1 parent ebdeac0 commit 1f72036

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

app/javascript/mastodon/locales/en.json

+1
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@
516516
"notification.label.private_reply": "Private reply",
517517
"notification.label.reply": "Reply",
518518
"notification.mention": "Mention",
519+
"notification.mentioned_you": "{name} mentioned you",
519520
"notification.moderation-warning.learn_more": "Learn more",
520521
"notification.moderation_warning": "You have received a moderation warning",
521522
"notification.moderation_warning.action_delete_statuses": "Some of your posts have been removed.",

app/javascript/mastodon/service_worker/web_push_locales.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
const fs = require('fs');
77
const path = require('path');
88

9+
const { defineMessages } = require('react-intl');
10+
11+
const messages = defineMessages({
12+
mentioned_you: { id: 'notification.mentioned_you', defaultMessage: '{name} mentioned you' },
13+
});
14+
915
const filtered = {};
1016
const filenames = fs.readdirSync(path.resolve(__dirname, '../locales'));
1117

@@ -20,7 +26,7 @@ filenames.forEach(filename => {
2026
'notification.favourite': full['notification.favourite'] || '',
2127
'notification.follow': full['notification.follow'] || '',
2228
'notification.follow_request': full['notification.follow_request'] || '',
23-
'notification.mention': full['notification.mention'] || '',
29+
'notification.mention': full[messages.mentioned_you.id] || '',
2430
'notification.reblog': full['notification.reblog'] || '',
2531
'notification.poll': full['notification.poll'] || '',
2632
'notification.status': full['notification.status'] || '',

0 commit comments

Comments
 (0)