diff --git a/src/ts/interface/common.ts b/src/ts/interface/common.ts index c28ccf4a81..032f8a2d7b 100644 --- a/src/ts/interface/common.ts +++ b/src/ts/interface/common.ts @@ -335,6 +335,7 @@ export interface SearchSubscribeParam { ignoreHidden: boolean; ignoreDeleted: boolean; ignoreArchived: boolean; + ignoreChat: boolean; skipLayoutFormat: I.ObjectLayout[]; noDeps: boolean; }; diff --git a/src/ts/lib/util/subscription.ts b/src/ts/lib/util/subscription.ts index 9b6911becd..ce1e671991 100644 --- a/src/ts/lib/util/subscription.ts +++ b/src/ts/lib/util/subscription.ts @@ -50,12 +50,12 @@ class UtilSubscription { defaultFilters (param: any) { const { config } = S.Common; - const { ignoreHidden, ignoreDeleted, ignoreArchived } = param; + const { ignoreHidden, ignoreDeleted, ignoreArchived, ignoreChat } = param; const filters = U.Common.objectCopy(param.filters || []); let skipLayouts = []; - if (!config.experimental) { + if (ignoreChat) { skipLayouts = skipLayouts.concat([ I.ObjectLayout.Chat, I.ObjectLayout.ChatOld ]); }; @@ -115,6 +115,7 @@ class UtilSubscription { ignoreHidden: true, ignoreDeleted: true, ignoreArchived: true, + ignoreChat: true, noDeps: false, afterId: '', beforeId: '', @@ -277,6 +278,7 @@ class UtilSubscription { ignoreHidden: true, ignoreDeleted: true, ignoreArchived: true, + ignoreChat: true, skipLayoutFormat: null, }, param); @@ -446,6 +448,7 @@ class UtilSubscription { ignoreDeleted: true, ignoreHidden: false, ignoreArchived: false, + ignoreChat: false, onSubscribe: () => { S.Record.getRecords(J.Constant.subId.type).forEach(it => S.Record.typeKeyMapSet(it.spaceId, it.uniqueKey, it.id)); }