From 1037fe0276e696f926ce35a85d4487130078a56a Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sun, 1 Sep 2024 15:32:41 +1200 Subject: [PATCH] Only apply power to bridged rooms --- matrix/power.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matrix/power.js b/matrix/power.js index 7ffa4256..a6fd063e 100644 --- a/matrix/power.js +++ b/matrix/power.js @@ -7,7 +7,9 @@ const {applyKStateDiffToRoom, roomToKState} = require("../d2m/actions/create-roo /** Apply global power level requests across ALL rooms where the member cache entry exists but the power level has not been applied yet. */ function _getAffectedRooms() { - return from("member_cache").join("member_power", "mxid") + return from("member_cache") + .join("member_power", "mxid") + .join("channel_room", "room_id") // only include rooms that are bridged .and("where member_power.room_id = '*' and member_cache.power_level != member_power.power_level") .selectUnsafe("mxid", "member_cache.room_id", "member_power.power_level") .all()