this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix handling of admin.report notification

This is untested, may break.

+11 -3
+11 -3
src/components/notification.jsx
··· 58 58 'favourite+reblog+account': (count) => 59 59 `boosted & favourited ${count} of your posts.`, 60 60 'favourite+reblog_reply': 'boosted & favourited your reply.', 61 - 'admin.report': 'reported a post.', 62 61 'admin.sign_up': 'signed up.', 62 + 'admin.report': (targetAccount) => <>reported {targetAccount}</>, 63 63 }; 64 64 65 65 const AVATARS_LIMIT = 50; 66 66 67 67 function Notification({ notification, instance, reload, isStatic }) { 68 - const { id, status, account, _accounts, _statuses } = notification; 68 + const { id, status, account, report, _accounts, _statuses } = notification; 69 69 let { type } = notification; 70 70 71 71 // status = Attached when type of the notification is favourite, reblog, status, mention, poll, or update ··· 119 119 } 120 120 121 121 if (typeof text === 'function') { 122 - text = text(_statuses?.length || _accounts?.length); 122 + const count = _statuses?.length || _accounts?.length; 123 + if (count) { 124 + text = text(count); 125 + } else if (type === 'admin.report') { 126 + const targetAccount = report?.targetAccount; 127 + if (targetAccount) { 128 + text = text(<NameText account={targetAccount} showAvatar />); 129 + } 130 + } 123 131 } 124 132 125 133 if (type === 'mention' && !status) {