Skip to content

Commit b7a2e9f

Browse files
c-calc-cal
authored andcommitted
fix: unfreeze notification_levels for the Rust implementation of PushRuleEvaluator, which can't handle immutabledict
1 parent 24c4d82 commit b7a2e9f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

synapse/push/bulk_push_rule_evaluator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
from synapse.util import unwrapFirstError
6060
from synapse.util.async_helpers import gather_results
6161
from synapse.util.caches import register_cache
62+
from synapse.util.frozenutils import unfreeze
6263
from synapse.util.metrics import measure_func
6364
from synapse.visibility import filter_event_for_clients_with_state
6465

@@ -412,7 +413,7 @@ async def _action_for_event_by_user(
412413
# Note that this is done automatically for the sender's power level by
413414
# _get_power_levels_and_sender_level in its call to get_user_power_level
414415
# (even for room V10.)
415-
notification_levels = power_levels.get("notifications", {})
416+
notification_levels = unfreeze(power_levels.get("notifications", {}))
416417
if not event.room_version.enforce_int_power_levels:
417418
keys = list(notification_levels.keys())
418419
for key in keys:

0 commit comments

Comments
 (0)