Files
whatsapp-mcp-go/whatsapp-mcp-server/helpers
M. L. Giannotta 3c9886fa10 fix(mcp-server): set Authorization header on Send{Message,File,AudioVoiceMessage}
The three Send* helpers in helpers/whatsapp.go construct their HTTP
requests directly instead of going through callAPI, and were missing the
Bearer token that the bridge's JWT middleware requires. Calls reached the
bridge as 401 Unauthorized.

In practice sendMessageHandler in mcp_tool.go bypasses SendMessage and
calls callAPI directly, so the text-send path happens to work; but the
file and audio-message MCP handlers route through SendFile and
SendAudioVoiceMessage respectively, so send_file and send_audio_message
were broken end-to-end.

Same shape as the recent DownloadMedia fix: fetch a JWT via
GetOrRefreshJwtToken and add Authorization: Bearer <token> on the
outgoing request.
2026-05-10 17:20:43 +08:00
..
2026-02-21 21:12:14 +01:00
2026-02-21 21:12:14 +01:00