Revert "FEATURE: Add chat message notifications for personal chats (#23307)" (#23559)

This reverts commit 0a1a07fff8.
This commit is contained in:
David Battersby
2023-09-13 19:33:22 +08:00
committed by GitHub
parent 0a1a07fff8
commit 7f7e7fe516
6 changed files with 0 additions and 244 deletions
@@ -105,60 +105,6 @@ export default {
};
}
);
api.registerNotificationTypeRenderer(
"chat_message",
(NotificationItemBase) => {
return class extends NotificationItemBase {
linkTitle = I18n.t("notifications.titles.chat_message");
icon = "comment";
get linkHref() {
const slug = slugifyChannel({
title: this.notification.data.chat_channel_title,
slug: this.notification.data.chat_channel_slug,
});
return `/chat/c/${slug || "-"}/${
this.notification.data.chat_channel_id
}/${this.notification.data.chat_message_id}`;
}
get label() {
return formatUsername(this.notification.data.username);
}
get description() {
const data = this.notification.data;
if (!data.is_group_message) {
return I18n.t("notifications.chat_message.personal", {
username: data.username,
});
}
if (!data.username2) {
return I18n.t("notifications.chat_message.group", {
username: data.username,
});
}
if (data.user_ids.length > 2) {
return I18n.t("notifications.chat_message.group_multiple", {
username: data.username,
count: data.user_ids.length - 1,
});
} else {
// only 2 users so we show the second username
return I18n.t("notifications.chat_message.group_multiple", {
username: data.username,
username2: data.username2,
count: 1,
});
}
}
};
}
);
}
if (api.registerUserMenuTab) {
@@ -179,7 +125,6 @@ export default {
get count() {
return (
this.getUnreadCountForType("chat_mention") +
this.getUnreadCountForType("chat_message") +
this.getUnreadCountForType("chat_invitation")
);
}