diff --git a/extensions/matrix/src/matrix/monitor/handler.ts b/extensions/matrix/src/matrix/monitor/handler.ts index 9cdc52eaa8f..a0217127ed6 100644 --- a/extensions/matrix/src/matrix/monitor/handler.ts +++ b/extensions/matrix/src/matrix/monitor/handler.ts @@ -741,6 +741,7 @@ export function createMatrixRoomMessageHandler(params: MatrixMonitorHandlerParam isRoom, }); const { + effectiveAllowFrom, effectiveGroupAllowFrom, effectiveRoomUsers, groupAllowConfigured, @@ -1149,6 +1150,7 @@ export function createMatrixRoomMessageHandler(params: MatrixMonitorHandlerParam triggerSnapshot, threadRootId: _threadRootId, thread, + effectiveAllowFrom, effectiveGroupAllowFrom, effectiveRoomUsers, }; @@ -1203,6 +1205,7 @@ export function createMatrixRoomMessageHandler(params: MatrixMonitorHandlerParam triggerSnapshot, threadRootId: _threadRootId, thread, + effectiveAllowFrom, effectiveGroupAllowFrom, effectiveRoomUsers, } = resolvedIngressResult; @@ -1832,7 +1835,7 @@ export function createMatrixRoomMessageHandler(params: MatrixMonitorHandlerParam const pinnedMainDmOwner = isDirectMessage ? resolvePinnedMainDmOwnerFromAllowlist({ dmScope: cfg.session?.dmScope, - allowFrom: liveDmAllowFrom, + allowFrom: effectiveAllowFrom, normalizeEntry: normalizeMatrixUserId, }) : null; diff --git a/extensions/matrix/src/types.ts b/extensions/matrix/src/types.ts index b5b234ea6dd..24832bcc59f 100644 --- a/extensions/matrix/src/types.ts +++ b/extensions/matrix/src/types.ts @@ -231,6 +231,7 @@ export type CoreConfig = { }; session?: { store?: string; + dmScope?: NonNullable["dmScope"]; }; messages?: { ackReaction?: string;