Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(soup): use backend soup filtering for people / teams (#1496)

teo7badded7a39b
diff --git a/js/app/packages/app/component/next-soup/filters/filters.ts b/js/app/packages/app/component/next-soup/filters/filters.ts
index 7e34207187..fe2cea59ac 100644
--- a/js/app/packages/app/component/next-soup/filters/filters.ts
+++ b/js/app/packages/app/component/next-soup/filters/filters.ts
@@ -19,6 +19,7 @@ import { AnimatedFileMdIcon } from '@macro-icons/wide/animating/fileMd';
import { AnimatedFolderIcon } from '@macro-icons/wide/animating/folder';
import { AnimatedStarIcon } from '@macro-icons/wide/animating/star';
import { AnimatedTaskIcon } from '@macro-icons/wide/animating/task';
+import { ChannelTypeEnum } from '@service-comms/client';
export const NIL_UUID = '00000000-0000-0000-0000-000000000000';
@@ -333,7 +334,7 @@ export const QUERY_FILTERS = {
document_filters: { document_ids: EXCLUDE },
email_filters: { recipients: EXCLUDE },
project_filters: { project_ids: EXCLUDE },
- channel_filters: {},
+ channel_filters: { channel_types: [ChannelTypeEnum.DirectMessage] },
},
/** Teams filter - group channels (non-DM) */
@@ -342,7 +343,13 @@ export const QUERY_FILTERS = {
document_filters: { document_ids: EXCLUDE },
email_filters: { recipients: EXCLUDE },
project_filters: { project_ids: EXCLUDE },
- channel_filters: {},
+ channel_filters: {
+ channel_types: [
+ ChannelTypeEnum.Private,
+ ChannelTypeEnum.Organization,
+ ChannelTypeEnum.Public,
+ ],
+ },
},
/** Agents filter - chats */
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx
index cb473ad00f..a4dfb6d0ff 100644
--- a/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx
@@ -217,7 +217,11 @@ export const SoupViewContextProvider: FlowComponent<
}
return {
- channel: channel_filters?.channel_ids?.length ? channel_filters : null,
+ channel:
+ channel_filters?.channel_ids?.length ||
+ channel_filters?.channel_types?.length
+ ? channel_filters
+ : null,
chat:
chat_filters?.chat_ids?.length || chat_filters?.project_ids?.length
? chat_filters