Merge pull request #264 from tloncorp/hm/restore-dms

notifications: remove filtering of dms
This commit is contained in:
Hunter Miller 2024-03-26 13:06:01 -05:00 committed by GitHub
commit 3d4f22632e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,15 +50,10 @@ export const useNotifications = (mentionsOnly = false) => {
};
}
const notDmsFromGroupsDesk = (s: Skein) =>
!((isDM(s.top.rope) || isClub(s.top.rope)) && isGroups(s.top.rope));
const unreads = skeins
.filter((s) => s.unread)
.filter((s) => notDmsFromGroupsDesk(s));
const filteredSkeins = skeins
.filter((s) => (mentionsOnly ? isMention(s.top) : s))
.filter((s) => notDmsFromGroupsDesk(s));
const unreads = skeins.filter((s) => s.unread);
const filteredSkeins = skeins.filter((s) =>
mentionsOnly ? isMention(s.top) : s
);
return {
notifications: groupSkeinsByDate(filteredSkeins),