fix(search): make closed DM search work correctly (#37)

This commit is contained in:
hampus-fluxer
2026-01-06 01:32:00 +01:00
committed by GitHub
parent ea0a2d8aae
commit cbe914cf6f
10 changed files with 127 additions and 1 deletions

View File

@@ -54,6 +54,13 @@ export const getDmChannelIdsForScope = async ({
channelIdStrings.add(summary.channelId.toString());
}
if (scope === 'all_dms') {
const historicalIds = await userRepository.listHistoricalDmChannelIds(userId);
for (const channelId of historicalIds) {
channelIdStrings.add(channelId.toString());
}
}
if (includeChannelId) {
channelIdStrings.add(includeChannelId.toString());
}