Files
OpenViking/bot/bridge
Zayn Jarvis 8da91a860b fix(bot): pass sender_name in all channel adapters (#3399)
* fix(bot): pass sender_name in all channel adapters

Sweep findings: C-01. Supply display-name fallbacks so inbound messages reach the bus.

* fix(bot): make sender_name optional and wire real WhatsApp pushName

Root-cause guard: _handle_message required sender_name positionally, but
InboundMessage.sender_name is str|None=None and context.py already falls back
to sender_id, so the required-ness was an accidental signature/contract
mismatch. Make it optional (reordered after the still-required chat_id/content;
all 11 call sites use keyword args) so no future adapter can crash on it.

WhatsApp: the previous call read data.get("senderName")/data.get("pushName"),
neither of which the bridge ever sends, so it silently always fell back to the
numeric id. Forward baileys' msg.pushName through the bridge payload and read it
in Python, so WhatsApp group chats show real display names like other channels.
2026-07-23 10:45:33 +08:00
..