Fix: Add ensure_ascii=False to WhatsApp send payload
The send() payload contains user message content (msg.content) which may include non-ASCII characters (e.g. CJK, German umlauts, emoji). The auth frame and Discord heartbeat/identify payloads are left unchanged as they only carry ASCII protocol fields.
This commit is contained in:
@@ -87,7 +87,7 @@ class WhatsAppChannel(BaseChannel):
|
|||||||
"to": msg.chat_id,
|
"to": msg.chat_id,
|
||||||
"text": msg.content
|
"text": msg.content
|
||||||
}
|
}
|
||||||
await self._ws.send(json.dumps(payload))
|
await self._ws.send(json.dumps(payload, ensure_ascii=False))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error sending WhatsApp message: {e}")
|
logger.error(f"Error sending WhatsApp message: {e}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user