Endswith=>includes to handle sort query in group chat
This commit is contained in:
parent
a247e6d0de
commit
906cfc29c8
|
@ -411,6 +411,7 @@ export const createGroupCommentNotification = async (
|
||||||
group: Group,
|
group: Group,
|
||||||
idempotencyKey: string
|
idempotencyKey: string
|
||||||
) => {
|
) => {
|
||||||
|
if (toUserId === fromUser.id) return
|
||||||
const notificationRef = firestore
|
const notificationRef = firestore
|
||||||
.collection(`/users/${toUserId}/notifications`)
|
.collection(`/users/${toUserId}/notifications`)
|
||||||
.doc(idempotencyKey)
|
.doc(idempotencyKey)
|
||||||
|
|
|
@ -294,7 +294,7 @@ function GroupsList(props: {
|
||||||
if (
|
if (
|
||||||
notification.isSeenOnHref === currentPage ||
|
notification.isSeenOnHref === currentPage ||
|
||||||
// Old chat style group chat notif ended just with the group slug
|
// Old chat style group chat notif ended just with the group slug
|
||||||
notification.isSeenOnHref?.endsWith(currentPageGroupSlug) ||
|
notification.isSeenOnHref?.includes(currentPageGroupSlug) ||
|
||||||
// They're on the home page, so if they've a chat notif, they're seeing the chat
|
// They're on the home page, so if they've a chat notif, they're seeing the chat
|
||||||
(notification.isSeenOnHref?.endsWith(GROUP_CHAT_SLUG) &&
|
(notification.isSeenOnHref?.endsWith(GROUP_CHAT_SLUG) &&
|
||||||
currentPage.endsWith(currentPageGroupSlug))
|
currentPage.endsWith(currentPageGroupSlug))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user