diff --git a/src/components/ICONS.jsx b/src/components/ICONS.jsx
index c0ad8bd4..98137774 100644
--- a/src/components/ICONS.jsx
+++ b/src/components/ICONS.jsx
@@ -106,4 +106,5 @@ export const ICONS = {
copy: () => import('@iconify-icons/mingcute/copy-2-line'),
quote: () => import('@iconify-icons/mingcute/quote-left-line'),
settings: () => import('@iconify-icons/mingcute/settings-6-line'),
+ unlink: () => import('@iconify-icons/mingcute/unlink-line'),
};
diff --git a/src/components/notification.jsx b/src/components/notification.jsx
index aeeb1065..6b6205a8 100644
--- a/src/components/notification.jsx
+++ b/src/components/notification.jsx
@@ -25,6 +25,7 @@ const NOTIFICATION_ICONS = {
update: 'pencil',
'admin.signup': 'account-edit',
'admin.report': 'account-warning',
+ severed_relationships: 'unlink',
};
/*
@@ -63,6 +64,14 @@ const contentText = {
'favourite+reblog_reply': 'boosted & liked your reply.',
'admin.sign_up': 'signed up.',
'admin.report': (targetAccount) => <>reported {targetAccount}>,
+ severed_relationships: (name) => `Relationships with ${name} severed.`,
+};
+
+// account_suspension, domain_block, user_domain_block
+const SEVERED_RELATIONSHIPS_TEXT = {
+ account_suspension: 'Account has been suspended.',
+ domain_block: 'Domain has been blocked.',
+ user_domain_block: 'You blocked this domain.',
};
const AVATARS_LIMIT = 50;
@@ -73,7 +82,8 @@ function Notification({
isStatic,
disableContextMenu,
}) {
- const { id, status, account, report, _accounts, _statuses } = notification;
+ const { id, status, account, report, event, _accounts, _statuses } =
+ notification;
let { type } = notification;
// status = Attached when type of the notification is favourite, reblog, status, mention, poll, or update
@@ -135,6 +145,11 @@ function Notification({
if (targetAccount) {
text = text(
+
+ {event?.purge ? (
+ 'Purged by administrators.'
+ ) : (
+ <>
+ {event.relationshipsCount} relationship
+ {event.relationshipsCount === 1 ? '' : 's'}
+ {!!event.createdAt && (
+ <>
+ {' '}
+ •{' '}
+
+ {SEVERED_RELATIONSHIPS_TEXT[event.type]}
+
+
+ View