Commit graph

27 commits

Author SHA1 Message Date
Darren Clarke
e941353b64 Repo cleanup 2026-02-10 08:36:04 +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
d0cc5a21de WhatsApp/Signal/Formstack/admin updates 2025-11-21 14:55:28 +01:00
Darren Clarke
83653ef23b Update Dockerfiles, add signal api generated outputs 2024-06-05 10:06:41 +02:00
Darren Clarke
6305a8b0bc Add Signal and Whatsapp Docker CI 2024-05-15 10:27:14 +02:00
Darren Clarke
b8ff61265b Remove .tsbuildinfo files 2024-05-15 07:55:48 +02:00
Darren Clarke
a445762a37 Metamigo -> Bridge 2024-04-21 09:44:30 +02:00
Darren Clarke
486f989494 Update deps 2024-03-03 18:13:26 +01:00
Darren Clarke
a3d6b786e1 Update middleware and deps 2023-09-06 16:42:52 +02:00
Darren Clarke
a53a26f4c0
Docker Compose refactoring 2023-06-21 12:48:07 +00:00
696ba16cb7 metamigo-api: runs in docker now
* great typescript module import refactor
* refactor metamigo-cli so it is the entrypoint for the db, api, and
  worker
2023-06-02 15:26:30 +00:00
bb83d88eeb gitignore: turbo's prune dir 2023-06-02 11:08:53 +00:00
607fea35e8 keep docker/zammad/addons directory around 2023-06-02 09:53:24 +00:00
Darren Clarke
8fabcbaba2 Add missing theme functions for metamigo-frontend 2023-05-26 08:06:16 +00:00
Darren Clarke
4498cc95f6 Update addons location 2023-05-16 10:34:05 +00:00
Darren Clarke
60e590f75c Addon build working 2023-05-10 09:34:18 +00:00
Darren Clarke
7b13e6ff71 Begin addon reorganization 2023-05-03 10:36:37 +00:00
Darren Clarke
161f3fcee2 Add missing Metamigo changes 2023-03-13 16:09:41 +00:00
346b40db98 Bring in hapi-pg-promise 2023-03-13 10:20:29 +00:00
67f7cf8e1b Bring in packages/montar 2023-03-13 10:04:22 +00:00
ad893637e6 metamigo: Use react 17, next 12. Disable react-mic
* We have to stay on react 17 (and therefore next 12) because we require
@mui/styles which does not support react 18
* Furthermore react-mic does not support a version of react after 16
  So I disabled the mic feature for now since it is not in use.
  In the future we will probably have to fork or implement our own mic
  library.
2023-03-10 10:19:08 +00:00
Darren Clarke
6eaaf8e9be Move in progress apps temporarily 2023-03-07 14:09:49 +00:00
Darren Clarke
b012f8295b Continue organization 2023-02-13 13:46:56 +00:00
Darren Clarke
e556cdceba Project structure update 2023-02-09 21:51:12 +00:00
Darren Clarke
6a0cc58f60
UI updates continued 2022-12-14 13:24:50 +01:00
Darren Clarke
95a21d6f50 Project setup 2022-12-02 10:55:56 +00:00