Commit graph

25 commits

Author SHA1 Message Date
Darren Clarke
38efae02d4 Merge feature/split-signal-improvements into combined branch
Combines Signal split/merge improvements with keycloak auth,
baileys-7 updates, and signal notifications support.

Resolved conflicts:
- Kept LID user ID support in bridge-whatsapp
- Kept bridge-dev.yml docker compose addition
- Used 3.5.0-beta.1 version from split-signal-improvements
2026-01-28 09:01:51 +01:00
Darren Clarke
eea56dd50b Reduce Signal message polling frequency from 15s to 30s 2026-01-21 10:08:59 +01:00
Darren Clarke
ac42d7df78 Use _uid instead of _id to please Rails 2026-01-19 16:51:51 +01:00
Darren Clarke
3d8f794cab Add user ID support for Baileys 7 LIDs and Signal UUIDs
Baileys 7 uses LIDs (Linked IDs) instead of phone numbers in remoteJid for
some messages. This caused messages to be matched to wrong tickets because
the LID was used as the sender identifier. This commit adds proper support
for both phone numbers and user IDs across WhatsApp and Signal channels.

Changes:

Database:
- Add migration for whatsapp_user_id and signal_user_id fields on users table

Zammad controllers:
- Update user lookup with 3-step fallback: phone → dedicated user_id field →
  user_id in phone field (legacy)
- Store user IDs in dedicated fields when available
- Update phone field when we receive actual phone number for legacy records
- Fix redundant condition in Signal controller

Bridge services:
- Extract both phone (from senderPn/participantPn) and LID (from remoteJid)
- Send both identifiers to Zammad via webhooks
- Use camelCase (userId) in bridge-whatsapp, convert to snake_case (user_id)
  in bridge-worker for Zammad compatibility

Baileys 7 compliance:
- Remove broken loadAllUnreadMessages() call (removed in Baileys 7)
- Return descriptive error directing users to use webhooks instead

Misc:
- Add docs/ to .gitignore
2026-01-15 13:08:56 +01:00
Darren Clarke
a882c9ecff Split ticket and group name fixes 2025-12-19 15:27:27 +01:00
Darren Clarke
d0cc5a21de WhatsApp/Signal/Formstack/admin updates 2025-11-21 14:55:28 +01:00
Darren Clarke
27300b2530 Signal and middleware updates 2024-09-05 16:19:58 +02:00
Darren Clarke
31faf22fd5 Signal attachment updates 2024-09-05 10:03:55 +02:00
Darren Clarke
a4053e6412 Zammad send fixes, update deps 2024-08-14 10:51:12 +02:00
Darren Clarke
aa453954ed Use server actions instead of client-side API calls 2024-08-05 23:31:15 +02:00
Darren Clarke
5e2475848e Signal send/receive fixes 2024-07-31 08:56:28 +02:00
Darren Clarke
c32c26088f Standardize bridge send/receive params 2024-07-18 11:08:01 +02:00
Darren Clarke
dbf3a95bbb Signal and Docker updates 2024-06-28 12:28:11 +02:00
Darren Clarke
0cf1c3b8fd Worker build updates 2024-06-28 07:49:39 +02:00
Darren Clarke
c729a46a0c Signal API updates 2024-06-05 15:12:48 +02:00
Darren Clarke
85a0fc11e5 Update package names 2024-06-05 08:52:41 +02:00
Darren Clarke
89d229eba9 Fix FB send job params 2024-05-17 13:24:18 +02:00
Darren Clarke
e26e5832ff More Whatsapp Docker updates 2024-05-17 09:20:00 +02:00
Darren Clarke
3da103c010 Whatsapp service updates 2024-05-16 18:22:10 +02:00
Darren Clarke
67a5b60ad5 Docker build updates 2024-05-14 15:31:44 +02:00
Darren Clarke
d1fb9b4d06 Refactoring 3 2024-04-30 13:13:49 +02:00
Darren Clarke
e4b78ceec2 Refactoring 2 2024-04-30 11:39:16 +02:00
Darren Clarke
dd14dfe72e Refactoring 2024-04-29 17:27:25 +02:00
Darren Clarke
f93c4ad317 Bridge worker updates 2024-04-21 16:59:50 +02:00
Darren Clarke
a445762a37 Metamigo -> Bridge 2024-04-21 09:44:30 +02:00