fix(gateway): include QQBOT in allowlist-aware unauthorized DM map
Follow-up to #9337: _is_user_authorized maps Platform.QQBOT to QQ_ALLOWED_USERS, but the new platform_env_map inside _get_unauthorized_dm_behavior omitted it. A QQ operator with a strict user allowlist would therefore still have the gateway send pairing codes to strangers. Adds QQBOT to the env map and a regression test.
This commit is contained in:
@@ -2988,6 +2988,7 @@ class GatewayRunner:
|
||||
Platform.WECOM_CALLBACK: "WECOM_CALLBACK_ALLOWED_USERS",
|
||||
Platform.WEIXIN: "WEIXIN_ALLOWED_USERS",
|
||||
Platform.BLUEBUBBLES: "BLUEBUBBLES_ALLOWED_USERS",
|
||||
Platform.QQBOT: "QQ_ALLOWED_USERS",
|
||||
}
|
||||
if os.getenv(platform_env_map.get(platform, ""), "").strip():
|
||||
return "ignore"
|
||||
|
||||
Reference in New Issue
Block a user