Skip to content

Commit

Permalink
fix: unfreeze notification_levels for the Rust implementation of Push…
Browse files Browse the repository at this point in the history
…RuleEvaluator, which can't handle immutabledict
  • Loading branch information
c-cal committed Jan 20, 2025
1 parent 24c4d82 commit b7a2e9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion synapse/push/bulk_push_rule_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
from synapse.util import unwrapFirstError
from synapse.util.async_helpers import gather_results
from synapse.util.caches import register_cache
from synapse.util.frozenutils import unfreeze
from synapse.util.metrics import measure_func
from synapse.visibility import filter_event_for_clients_with_state

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

0 comments on commit b7a2e9f

Please sign in to comment.