fix(whatsapp): honor dm_policy and group_policy open at the gateway

This commit is contained in:
Zyrixtrex
2026-06-01 19:51:21 -07:00
committed by Teknium
parent d4b533de4e
commit 0cd5867bbb
4 changed files with 18 additions and 8 deletions
+2 -2
View File
@@ -1750,8 +1750,8 @@ class BasePlatformAdapter(ABC):
def enforces_own_access_policy(self) -> bool:
"""Whether this adapter gates inbound access before dispatch.
Some adapters (WeCom, Weixin, Yuanbao, QQBot) implement a documented
config-driven access surface — ``dm_policy`` / ``group_policy`` /
Some adapters (WeCom, Weixin, Yuanbao, QQBot, WhatsApp) implement a
documented config-driven access surface — ``dm_policy`` / ``group_policy`` /
``allow_from`` / ``group_allow_from`` in ``PlatformConfig.extra`` — and
enforce it at intake: a message is dropped inside the adapter and never
reaches the gateway unless it already passed that policy.