Commit graph

270 commits

Author SHA1 Message Date
Tulir Asokan
e8c77c7ec6 Try to track when the phone is online and warn user if it's offline for too long 2022-01-25 14:26:24 +02:00
Tulir Asokan
9e39ce565b Move read receipt handling to portal loop
This ensures that read receipts are only handled after the message
they're pointing at, even if the read receipt is sent immediately
(e.g. when the user has WhatsApp open on their phone).
2022-01-19 14:18:34 +02:00
Tulir Asokan
1ebfeedcb7 Send fully read marker too when bridging read receipts to Matrix 2022-01-17 22:56:18 +02:00
Tulir Asokan
cd29b36a07 Send not logged in bridge status before clearing JID 2022-01-17 16:58:19 +02:00
Tulir Asokan
4a49de388c Update mautrix-go to fix state store not being updated in some cases 2022-01-17 15:44:00 +02:00
Tulir Asokan
c4a7943775 Add logs to debug read receipts 2022-01-17 10:38:44 +02:00
Tulir Asokan
7f636e6aef Update whatsmeow to read group disappearing message timer 2022-01-07 15:05:09 +02:00
Tulir Asokan
2ce9947130 Fix double puppet marker in read receipts 2022-01-07 14:38:44 +02:00
Tulir Asokan
b63b37177d Make user moderator in personal filtering space 2021-12-30 12:30:29 +02:00
Tulir Asokan
7e5c2769c6 Clean up personal filtering space support 2021-12-29 21:40:08 +02:00
Helder Ferreira
dfa845efb4
Fix concurrency issues creating/getting the space 2021-12-29 12:19:16 +00:00
Helder Ferreira
727b11e7ef
add newly created channels to the space
Co-authored-by: clmnin <clament.john.k@gmail.com>
2021-12-29 08:37:41 +00:00
Helder Ferreira
863c375be0
Init space creation
Co-authored-by: clmnin <clament.john.k@gmail.com>
2021-12-29 08:37:24 +00:00
Tulir Asokan
ca5fcc42ba Reroute broadcast list messages to correct DM portal. Fixes #411 2021-12-25 20:50:36 +02:00
Tulir Asokan
5e2b54f97e Add constant for double puppet value 2021-12-15 13:51:20 +02:00
Sumner Evans
c15b963748
double puppeting: use fi.mau.double_puppet_source 2021-12-15 02:51:26 -07:00
Tulir Asokan
1d8ef6cb89 Add support for MSC2409 2021-12-07 16:02:51 +02:00
Tulir Asokan
efd6e1a84f Add support for whatsapp-side read receipt privacy 2021-12-07 15:30:08 +02:00
Tulir Asokan
c55cad980d Fix handling read receipts where target is unknown 2021-12-01 14:15:39 +02:00
Tulir Asokan
a909750dcc Mark all messages as read instead of only last one 2021-11-30 16:38:37 +02:00
Tulir Asokan
231691ebbd Update whatsmeow to maybe fix retry receipts 2021-11-30 15:14:56 +02:00
Tulir Asokan
a61ef492cf Fix status broadcast check accidentally muting all chats 2021-11-22 11:03:09 +02:00
Tulir Asokan
0d6af45dcf Fix small mistakes 2021-11-15 14:42:06 +02:00
Tulir Asokan
ed58449544 Add option to mute the status broadcast room by default 2021-11-15 14:06:31 +02:00
Tulir Asokan
6b260dceda Fix bridging receipts with multiple message IDs 2021-11-10 20:26:28 +02:00
Tulir Asokan
e81b5ae405 Update whatsmeow to handle identity changes in prekey messages 2021-11-09 23:12:10 +02:00
Tulir Asokan
cae2b8afa1 Make showing identity change notices configurable 2021-11-09 22:57:36 +02:00
Tulir Asokan
a8beec8754 Handle identity changes properly. Fixes #384 2021-11-09 17:49:34 +02:00
Tulir Asokan
01c1648c07 Add sync command 2021-11-08 20:57:04 +02:00
Tulir Asokan
8e25088d8b Don't try to set WA presence before PushName is known 2021-11-08 13:04:54 +02:00
Tulir Asokan
f5ae637ffd Resync all puppets after app state sync completes 2021-11-08 13:04:39 +02:00
Tulir Asokan
de9977b7d2 Add support for automatic double puppeting from other servers 2021-11-06 13:57:35 +02:00
Tulir Asokan
752aff48f1 Prioritize backfilling recent messages and fix some bugs 2021-11-03 21:34:06 +02:00
Tulir Asokan
2d90295488 Use partial info from history sync if latest group info not found 2021-11-03 14:43:53 +02:00
Tulir Asokan
146efa9e94 Ignore old call start events 2021-11-03 10:56:16 +02:00
Tulir Asokan
b11a1664dd Sort chats by timestamp when handling history sync 2021-11-02 19:19:11 +02:00
Tulir Asokan
2977994f74 Fix incoming group call text 2021-11-02 15:52:12 +02:00
Tulir Asokan
e0d79f2de1 Re-add call start notices 2021-11-02 15:46:31 +02:00
Tulir Asokan
817cd21550 Create all portals before backfilling when handling history syncs 2021-11-02 14:06:21 +02:00
Tulir Asokan
4ac445a868 Fix checking if message contains interesting things 2021-11-01 15:30:56 +02:00
Tulir Asokan
a438e1e53d Update whatsmeow 2021-11-01 11:44:25 +02:00
Tulir Asokan
345244fedb Reimplement open command 2021-11-01 11:28:52 +02:00
Sumner Evans
96cf814848
Add option to disable federation on portal rooms (#362) 2021-11-01 11:17:44 +02:00
Tulir Asokan
1e5d5c1a3e Implement joining groups and checking invite links 2021-10-31 19:59:30 +02:00
Tulir Asokan
e3aed76f7a Add option to limit age of chats to create portals for 2021-10-30 21:54:35 +03:00
Tulir Asokan
c6ff126151 Add some logs for history sync handling 2021-10-29 22:07:40 +03:00
Tulir Asokan
745dd1cd63 Fix incorrect bridge state after logging out 2021-10-29 22:03:00 +03:00
Tulir Asokan
3d384a6db7 Clean up and fix some things 2021-10-29 16:50:29 +03:00
Tulir Asokan
b2e6a614b9 Update delete-all-portals and remove commented code 2021-10-28 14:27:59 +03:00
Tulir Asokan
b1baa0a0a1 Rename relay permission level 2021-10-28 14:03:55 +03:00
Tulir Asokan
bb9a0f6528 Make relay mode more like the Signal bridge 2021-10-28 13:57:15 +03:00
Tulir Asokan
149e9bc8af Implement WhatsApp->Matrix group info updates 2021-10-28 12:59:22 +03:00
Tulir Asokan
92c9ec6203 Remove some commented code and add note about future code to remove 2021-10-27 19:48:14 +03:00
Tulir Asokan
2cd6713cc4 Add typing notification bridging in both directions 2021-10-27 19:30:34 +03:00
Tulir Asokan
b918b4f261 Handle decryption errors from WhatsApp properly 2021-10-27 18:31:33 +03:00
Tulir Asokan
ded2fb9799 Implement logout and provisioning API login 2021-10-27 15:54:34 +03:00
Tulir Asokan
0b4d0bbbe1 Handle history sync payloads with MSC2716 batch sending 2021-10-26 17:01:10 +03:00
Tulir Asokan
b45e6b29f5 Fix panic and double puppeting 2021-10-25 18:31:37 +03:00
Tulir Asokan
56850bb698 Initial switch to go.mau.fi/whatsmeow 2021-10-22 20:14:34 +03:00
Tulir Asokan
cad99ece0a Improve logging in reconnection loop 2021-09-24 14:07:32 -04:00
Tulir Asokan
74870ec638 Add proper error message for multi-device 2021-09-23 14:09:03 -04:00
Tulir Asokan
f84bb162ca Don't send typing notifications if Matrix room hasn't been created 2021-08-18 15:52:50 +03:00
Tulir Asokan
abbff16e66 Switch bridge state system to using state events 2021-08-04 16:14:47 +03:00
Tulir Asokan
4b80c15a0a Add some logs and increase timestamp difference for short-circuiting deduplication 2021-06-21 13:53:08 +03:00
Tulir Asokan
bc7a82c0be Use mutex for accessing go-whatsapp contacts and chats maps 2021-06-19 02:22:01 +03:00
Tulir Asokan
d3b9f4f637 Handle websocket keepalive errors and update deps 2021-06-15 15:07:42 +03:00
Tulir Asokan
b5c3e8abcb Make sure puppet has displayname set when sending message 2021-06-15 12:34:55 +03:00
Tulir Asokan
d4b7595b6e Add better error messages for some send errors 2021-06-15 12:07:31 +03:00
Tulir Asokan
06b84c4bb9 Add option to disable status bridging. Fixes #166 2021-06-01 15:28:15 +03:00
Tulir Asokan
74e21b8e1d Make bridge state monitoring more generic 2021-06-01 15:19:47 +03:00
Tulir Asokan
b07412b421 Don't mark messages older than chat info receive date as read after backfill 2021-05-18 20:09:12 +03:00
Tulir Asokan
66f0b04a31 Send double puppeting identifier with read receipts if server supports it 2021-05-18 15:23:19 +03:00
Tulir Asokan
62e806c8c3 Add option to disable backfill read receipt bridging 2021-05-18 14:16:35 +03:00
Tulir Asokan
1bdbf0a22d Update go-whatsapp 2021-05-18 13:15:40 +03:00
Tulir Asokan
b9b4c11d81 Update dependencies 2021-05-12 14:54:40 +03:00
Tulir Asokan
4c803a6a13 Include message tag when logging raw JSON messages 2021-05-04 21:44:55 +03:00
Tulir Asokan
947f3466b7 Treat muted until -1 as muted forever 2021-05-04 19:53:43 +03:00
Tulir Asokan
29254ee29a Add more logging to debug chat mute bridging 2021-05-04 13:50:35 +03:00
Tulir Asokan
2742d90299 Add option to only bridge mute status and tags when creating portal 2021-04-29 11:57:05 +03:00
Tulir Asokan
f9098cdf18 Add option to bridge chat pin status from WhatsApp 2021-04-20 16:32:23 +03:00
Tulir Asokan
badea9c547 Add option to bridge archive and mute status from WhatsApp 2021-04-19 22:14:32 +03:00
Tulir Asokan
9a6d9f0383 Don't start new post-login sync if old one is still in progress 2021-04-01 14:06:10 +03:00
Tulir Asokan
9f64b357e0 Mark Matrix room as read if WhatsApp chat is read after backfill 2021-03-22 14:16:04 +02:00
Tulir Asokan
c7ecae8129 Update asmux DM endpoint 2021-03-15 22:05:26 +02:00
Tulir Asokan
cbdd10e704 Send real-time whatsapp connection state to asmux 2021-03-15 18:06:16 +02:00
Tulir Asokan
0b5eeef689 Update mautrix-go to add auth type to register requests 2021-03-04 19:46:32 +02:00
Tulir Asokan
1c28fbb49b Fix more connection bugs 2021-02-25 13:49:28 +02:00
Tulir Asokan
37c2a064a5 Update go-whatsapp to handle query timeouts 2021-02-24 17:18:27 +02:00
Tulir Asokan
3b6d4322d6 Disable trying non-takeover reconnect first 2021-02-24 00:13:26 +02:00
Tulir Asokan
69e5a26e01 Improve handling of errors noticed in provisioning API pings 2021-02-24 00:06:11 +02:00
Tulir Asokan
a5d60bf87d Autoreconnect if keepalive ping throws error 2021-02-23 17:36:42 +02:00
Tulir Asokan
3b22015b83 Disable logging of all WebMessageInfos 2021-02-21 17:11:36 +02:00
Tulir Asokan
a911a0c1a9 Add better support for broadcast lists 2021-02-21 14:18:15 +02:00
Tulir Asokan
15b4350622 Save session to db when changed 2021-02-19 20:39:50 +02:00
Tulir Asokan
7bd47fabb2 Update go-whatsapp to break everything and maybe improve things 2021-02-18 23:36:14 +02:00
Tulir Asokan
69dd7f803a Move whatsapp-ext to go-whatsapp 2021-02-17 01:21:30 +02:00
Tulir Asokan
67a39bb6c8 Automatically re-login-matrix on M_UNKNOWN_TOKEN 2021-02-11 20:47:17 +02:00
Tulir Asokan
ba0ec021ba Update go-whatsapp 2021-02-10 21:20:31 +02:00
Tulir Asokan
e6045a3cf5 Fix bug if portal sync finishes early 2021-02-10 20:59:50 +02:00
Tulir Asokan
87ead90e03 Ignore group leaves in message history 2021-02-10 20:27:14 +02:00