Skip to content

The agent that grows with you

refactor(matrix): let the auth callback default chat_type for invites/reactions

kshitijk4poor45871e100fec
diff --git a/plugins/platforms/matrix/adapter.py b/plugins/platforms/matrix/adapter.py
index 8702f9e95e8..3b95ade06b4 100644
--- a/plugins/platforms/matrix/adapter.py
+++ b/plugins/platforms/matrix/adapter.py
@@ -2580,7 +2580,7 @@ class MatrixAdapter(BasePlatformAdapter):
def _is_authorized_user(self, user_id: str, room_id: str | None = None) -> bool:
"""Resolve live gateway authorization, falling back to the startup snapshot when unwired."""
if getattr(self, "_authorization_check", None) is not None:
- return self._is_sender_authorized(user_id, "group", room_id) is True
+ return self._is_sender_authorized(user_id, chat_id=room_id) is True
# Scoped read — the DEFAULT profile's os.environ opt-in must not authorize on a secondary bot.
return _get_scoped_secret("GATEWAY_ALLOW_ALL_USERS", "").strip().lower() in ("true", "1", "yes") or bool(
self._allowed_user_ids and user_id in self._allowed_user_ids)