regression: checks if the `hideUnreadStatus` property is coming from the subscription (#5649)
* regression: checks if the hideUnreadStatus property is coming from the subscription * fix: puts the rule closer to the web * fix: use hasOwnProperty to check hideUnreadStatus comparison
This commit is contained in:
parent
b0c9e16507
commit
a035211cdf
|
@ -182,7 +182,7 @@ const createOrUpdateSubscription = async (subscription: ISubscription, room: ISe
|
|||
s.bannerClosed = false;
|
||||
}
|
||||
}
|
||||
if (sub.hideUnreadStatus) {
|
||||
if (sub.hideUnreadStatus && subscription.hasOwnProperty('hideUnreadStatus')) {
|
||||
if (sub.hideUnreadStatus !== subscription.hideUnreadStatus) {
|
||||
s.hideUnreadStatus = !!subscription.hideUnreadStatus;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ const OMNICHANNEL_HEADER_IN_PROGRESS = 'Open_Livechats';
|
|||
const OMNICHANNEL_HEADER_ON_HOLD = 'On_hold_Livechats';
|
||||
const QUERY_SIZE = 20;
|
||||
|
||||
const filterIsUnread = (s: TSubscriptionModel) => (s.unread > 0 || s.tunread?.length > 0 || s.alert) && !s.hideUnreadStatus;
|
||||
const filterIsUnread = (s: TSubscriptionModel) => (s.alert || s.unread) && !s.hideUnreadStatus;
|
||||
const filterIsFavorite = (s: TSubscriptionModel) => s.f;
|
||||
const filterIsOmnichannel = (s: TSubscriptionModel) => s.t === 'l';
|
||||
const filterIsTeam = (s: TSubscriptionModel) => s.teamMain;
|
||||
|
|
Loading…
Reference in New Issue