From 7b55b89ac67117e58843c65d61578c920edebe7f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 12 Oct 2022 13:28:30 -0400 Subject: [PATCH] Use a more correct subset of users in `/remakeolm` developer command (#9402) --- src/SlashCommands.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index e731840397..a5661876dc 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -1104,12 +1104,13 @@ export const Commands = [ MatrixClientPeg.get().forceDiscardSession(roomId); - // noinspection JSIgnoredPromiseFromCall - MatrixClientPeg.get().crypto.ensureOlmSessionsForUsers(room.getMembers().map(m => m.userId), true); + return success(room.getEncryptionTargetMembers().then(members => { + // noinspection JSIgnoredPromiseFromCall + MatrixClientPeg.get().crypto.ensureOlmSessionsForUsers(members.map(m => m.userId), true); + })); } catch (e) { return reject(e.message); } - return success(); }, category: CommandCategories.advanced, renderingTypes: [TimelineRenderingType.Room],