Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_event_allowed callback from the module API cause a TypeError #18101

Open
c-cal opened this issue Jan 20, 2025 · 0 comments · May be fixed by #18103
Open

check_event_allowed callback from the module API cause a TypeError #18101

c-cal opened this issue Jan 20, 2025 · 0 comments · May be fixed by #18103

Comments

@c-cal
Copy link

c-cal commented Jan 20, 2025

Description

ThirdPartyEventRulesModuleApiCallbacks.check_event_allowed() freezes incoming events for safety purpose, but the Rust implementation of PushRuleEvaluator doesn't seem to handle immutabledict.

Steps to reproduce

  • extend the server config with
default_power_level_content_override:
  public_chat:
    notifications:
      room: 0
  • register a module which register a check_event_allowed callback. The callback could do nothing, eg: return (True, None)
  • try to create a public room to see the bug

Homeserver

a local homeserver

Synapse Version

v1.122.0

Installation Method

Docker (matrixdotorg/synapse)

Database

PostgreSQL 15

Workers

Single process

Platform

Ubuntu 24.04

Configuration

No response

Relevant log output

File "/usr/local/lib/python3.12/site-packages/synapse/push/bulk_push_rule_evaluator.py", line 429, in _action_for_event_by_user
     evaluator = PushRuleEvaluator(
                 ^^^^^^^^^^^^^^^^^^
 TypeError: argument 'notification_power_levels': 'immutabledict' object cannot be converted to 'PyDict'

Anything else that would be useful to know?

No response

@c-cal c-cal linked a pull request Jan 20, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant