29 Commits

Author SHA1 Message Date
Atul Singh b5434016ab update: Remove troubleshooting instructions from README
Removed troubleshooting section related to Bridge application and MCP server as it is no longer required and code can automatically update WA web client version
2026-06-08 07:28:25 +02:00
iamatulsingh d20632fe1a fix: person name update using other options before saving same as number 2026-06-01 17:20:15 +02:00
Atul Singh 1fca76e917 Merge pull request #11 from iamatulsingh/fix-workflow
fix: container tag fixed
2026-05-13 14:22:19 +02:00
Atul_Singh d4048e810e fix: container tag fixed 2026-05-13 14:21:34 +02:00
Atul Singh d88b94e4f4 fix: proper tag version for docker images (#10)
* fix: proper tag version for docker images

* update: Clean up docker-publish.yml by removing blank lines

Removed unnecessary blank lines in the Docker publish workflow.

---------

Co-authored-by: Atul_Singh <atul.singh@carvaloo.com>
2026-05-13 14:09:14 +02:00
Atul Singh 92f5f431d7 update: README and screenshot (#8)
* update: README and screenshot

* fix: image path for n8n demo in README

* fix: convert screenshot section to HTML table format

Updated the README to use HTML table for screenshots.

* fix: remove table headers from README

Removed table headers from README.
2026-05-13 13:56:49 +02:00
Atul Singh c0abf38652 Merge pull request #9 from iamatulsingh/fix-workflow
fix: create new container when new release created or manual dispatch
2026-05-13 13:56:18 +02:00
Atul_Singh 316857c7f6 fix: create new container when new release created or manual dispatch 2026-05-13 13:55:22 +02:00
Atul Singh c0ce031b8e Merge pull request #7 from iamatulsingh/fix-workflow
update: github actions version upgrade
2026-05-13 13:19:16 +02:00
iamatulsingh 13c9f4d119 update: github actions version upgrade 2026-05-13 13:16:43 +02:00
Atul Singh 193e0d3c77 feat: ratelimit, ghcr package support, media path sensitization, LID to CN migration (#6)
* feat: ratelimit, ghcr package and proper project refactor from askarzh

* fix(bridge): validate media path

* update: dependencies

* fix: added LID to contact number migration
2026-05-13 12:54:31 +02:00
Atul Singh 680ef32b31 Merge pull request #3 from sunyatasattva/chore/cleanup-compose-defaults
chore(bridge): clean up docker-compose defaults
2026-05-10 17:55:59 +02:00
Atul Singh c75a89220a Merge pull request #4 from sunyatasattva/docs/fix-auth-header-format
docs: fix authentication section in README
2026-05-10 17:55:46 +02:00
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 0946c1845d docs: fix authentication section in README
The HTTP API uses a JWT-based scheme, not an "ApiKey <key>" scheme.
`auth/login.go` accepts `Authorization: Bearer <api-key>` on
`/auth/login`, returns a JWT, and the JwtAuthMiddleware then expects
`Authorization: Bearer <jwt>` on every `/api/*` request. The previous
example would 401.

Replace the section with the actual two-step flow plus a working
`curl` invocation for each step. Also fix the endpoint path
(`/api/messages`, not `/messages`).
2026-05-10 16:04:33 +08:00
M. L. Giannotta 4f72261998 chore(bridge): clean up docker-compose defaults
* Drop the obsolete top-level `version: "3.9"` key (Compose v2 ignores it
  with a warning).
* Align `POSTGRES_DB` with the database name the bridge actually opens.
  main.go opens "whatsapp" unconditionally, so the previous "testdb"
  default makes the stack fail on first `docker compose up` with
  `pq: database "whatsapp" does not exist`.
* Replace the public placeholder `API_KEY` / `JWT_SECRET` values with
  CHANGE_ME markers and an inline command for generating safe ones, so a
  user who copy-pastes the file can't accidentally bring up a bridge with
  publicly-known credentials.
* Drop the hard-coded `WEBHOOK_URL` pointing at a private 192.168.x
  n8n instance and replace with a commented optional example. The env
  var is read with `os.Getenv`, so leaving it unset is supported.
2026-05-10 16:03:09 +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