Commit Graph

14 Commits

Author SHA1 Message Date
Atul Singh 294b4f42a9 Merge pull request #5 from sunyatasattva/fix/send-helpers-auth
fix(mcp-server): set Authorization header on Send{Message,File,AudioVoiceMessage}
2026-05-10 17:55:34 +02:00
Atul Singh 907fadec73 Merge pull request #2 from sunyatasattva/fix/download-media-auth
fix(mcp-server): set Authorization header on DownloadMedia
2026-05-10 17:55:21 +02:00
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
M. L. Giannotta 4928db6b56 fix(mcp-server): set Authorization header on DownloadMedia
DownloadMedia builds its HTTP request directly instead of going through
callAPI, and was missing the Bearer token that the bridge's JWT middleware
requires. As a result, every download_media MCP tool call returned 401.

Fetch a JWT via GetOrRefreshJwtToken (same path the rest of the helpers
use) and set the Authorization header on the request.
2026-05-10 16:01:34 +08:00
Atul Singh c9523748f9 Merge pull request #1 from 2anoubis/fix-postgresql-parameter-type
Fix PostgreSQL parameter type error in ListChats
2026-05-05 17:48:16 +03:00
Mike 4a1bdda2ae Fix PostgreSQL parameter type error in ListChats
- Added ::int type casting to LIMIT and OFFSET parameters for PostgreSQL
- Fixed parameter numbering: changed placeholder(len(args)+2) to placeholder(len(args)+1) for OFFSET clause
- Resolves error: pq: could not determine data type of parameter  (42P18)

This fix ensures proper parameter binding when using PostgreSQL with the
whatsapp-bridge ListChats endpoint, which is used by the MCP server
to retrieve WhatsApp chat lists.
2026-04-09 15:05:04 +03:00
iamatulsingh f10176ffa7 feat: added new http streamable option instead of deprecated sse 2026-03-26 09:09:50 +01:00
iamatulsingh b136334953 feat: webhook option added for incoming messages 2026-03-24 21:23:41 +01:00
Atul Singh 84a31a8ae8 feat: Add authentication section to README
Added authentication section detailing API Key and JWT usage.
2026-03-08 22:27:05 +01:00
iamatulsingh cc6f466c72 feat: add JWT authentication middleware and login endpoint 2026-03-08 21:01:04 +01:00
iamatulsingh b5ac108719 feat: JWT authentication middleware and login endpoint 2026-03-08 21:00:28 +01:00
iamatulsingh 54ce4d417f fix: minor cleanup for makefile and dockerfile 2026-02-22 15:06:08 +01:00
iamatulsingh a47578c698 fix: screenshots to cropped for better view 2026-02-22 15:05:03 +01:00
iamatulsingh dd5e347436 feat: whatsapp-mcp-go 2026-02-21 21:12:14 +01:00