mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Treat direct messages as mention, group behaviour is the same
This commit is contained in:
@@ -240,15 +240,16 @@ export const ServerListSidebar = observer(({ unreads, lastOpened }: Props) => {
|
||||
let homeUnread: "mention" | "unread" | undefined;
|
||||
let alertCount = 0;
|
||||
for (const x of channels) {
|
||||
if (
|
||||
(x.channel?.channel_type === "DirectMessage"
|
||||
? x.channel?.active
|
||||
: x.channel?.channel_type === "Group") &&
|
||||
x.unread
|
||||
) {
|
||||
if (x.channel?.channel_type === "Group" && x.unread) {
|
||||
homeUnread = "unread";
|
||||
alertCount += x.alertCount ?? 0;
|
||||
}
|
||||
if (
|
||||
x.channel?.channel_type === "DirectMessage" &&
|
||||
x.unread &&
|
||||
x.unread.length > 0
|
||||
)
|
||||
alertCount++;
|
||||
}
|
||||
|
||||
alertCount += [...client.users.values()].filter(
|
||||
|
||||
Reference in New Issue
Block a user