Commit graph

974 commits

Author SHA1 Message Date
Tulir Asokan
f085b4d11c Don't print generated registration message if config is invalid 2022-04-09 17:04:36 +03:00
Tulir Asokan
0dc5c820c4 Update dependencies 2022-04-09 16:56:33 +03:00
Sumner Evans
37b8065db5
Merge pull request #461 from mautrix/sumner/bri-2227
history sync: implement prioritized backfill
2022-04-07 09:28:25 -06:00
Sumner Evans
bd26fc4af9
Minor cleanups from CR
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2022-04-07 09:20:43 -06:00
Tulir Asokan
d4318d54a4 Add missing return 2022-04-07 10:48:36 +03:00
Sumner Evans
78c6d57299
historysync: only save when backfill is enabled 2022-04-06 09:00:48 -06:00
Sumner Evans
c664e5f107
Updates from CR
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2022-04-06 08:56:58 -06:00
Sumner Evans
83d397900f
media: add better error when media couldn't be retrieved due to WA deleting it from their servers 2022-04-05 15:35:02 -06:00
Sumner Evans
eb0a13a753
historysync: use userID, conversationID, messageID as PK 2022-04-05 13:16:31 -06:00
Sumner Evans
005fbb09f8
backfill queue: don't delete, just mark as complete 2022-04-05 13:16:31 -06:00
Sumner Evans
173edfaaf1
batch send: fix plaintext content
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2022-04-05 13:16:29 -06:00
Sumner Evans
a8be4b11a8
historysync: start deferred backfill on non-full syncs
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2022-04-05 13:16:01 -06:00
Sumner Evans
748c9509a1
historysync: lock earlier to prevent races and duplicate messages
Closes BRI-2709
2022-04-04 16:07:25 -06:00
Sumner Evans
54534f6b42
historysync: enqueue immediate backfill on INITIAL_BOOTSTRAP 2022-03-30 17:59:55 -06:00
Sumner Evans
830c294b91
historysync: delete history sync messages once backfilled 2022-03-30 17:40:23 -06:00
Sumner Evans
8a49fea812
backfill: backfill conversation when started
This applies to when the conversation is started via the provisioning
API (start new chat) or when a new message comes in to that portal.
2022-03-29 23:40:22 -06:00
Sumner Evans
e702bf39d2
commands/backfill: add command to manually backfill a portal 2022-03-29 23:40:22 -06:00
Sumner Evans
12a23e2ca5
historysync: refactor to utilize backfill queue
Also sends the `m.room.marker` event when a backfill stage is complete.
2022-03-29 19:26:11 -06:00
Sumner Evans
536d340f20
config: add settings for prioritized backfill
bridge.history_sync.max_initial_conversations:

  This setting determines the maximum number of initial conversations
  that should be backfilled. The data for all the other conversations
  will be stored in the database for backfill at a later time.

bridge.history_sync.immediate:

  These settings are for the initial backfill that should be performed
  to populate each of the initial chats with a few messages so that
  users can continue their conversations without loosing context.

bridge.history_sync.deferred:

  These settings are for backfilling the rest of the chat history that
  was not covered by the immediate backfills. These should generally be
  done at a slower pace to avoid overloading the homeserver.
2022-03-29 12:16:31 -06:00
Sumner Evans
1ecdb71ac3
database: add backfill queue and history sync tables 2022-03-29 12:16:30 -06:00
Tulir Asokan
25c77b0fb5 Update mautrix-go and whatsmeow 2022-03-29 21:14:16 +03:00
Tulir Asokan
0a61d21373 Update whatsmeow 2022-03-29 16:10:28 +03:00
Tulir Asokan
5ef66496d6 Acquire roomCreateLock when updating puppet info to prevent race conditions 2022-03-25 00:02:38 +02:00
Tulir Asokan
44eaf285e6 Adjust outdated version logs 2022-03-23 14:46:30 +02:00
Tulir Asokan
f88abb99a8 Use Go 1.18 for lint 2022-03-23 13:14:36 +02:00
Tulir Asokan
d1c70fbda1 Update changelog 2022-03-22 13:49:28 +02:00
Tulir Asokan
f79ca422e8 Add option to use async media uploads
https://github.com/matrix-org/matrix-spec-proposals/pull/2246
2022-03-21 21:08:48 +02:00
Tulir Asokan
34954fc9f6 Update whatsmeow 2022-03-20 02:00:24 +02:00
Tulir Asokan
807c59fe21 Update actions to checkout@v3 and setup-go@v3 2022-03-18 01:18:30 +02:00
Tulir Asokan
3a6c314878 Normalize variation selectors in emojis in both directions
Remove for WhatsApp, add for Matrix
2022-03-18 01:12:25 +02:00
Sumner Evans
61409ce2bc
Merge pull request #432 from mautrix/pre-commit-config
pre-commit: add config and add lint job to CI
2022-03-16 08:41:47 -06:00
Tulir Asokan
756040c6a9 Bump version to v0.3.0 2022-03-16 01:32:15 +02:00
Tulir Asokan
caacac15c7 Check database owner and foreign tables before starting 2022-03-16 01:15:13 +02:00
Tulir Asokan
73241b6f21 Add proper bridge state errors for different logout types 2022-03-15 16:04:10 +02:00
Tulir Asokan
44f232f37b Remove special-cased fast backfill
It's not particularly useful and causes the portals to jump around more
2022-03-15 00:04:40 +02:00
Tulir Asokan
df64bb0e10 Handle disappearing messages in history sync properly 2022-03-15 00:03:37 +02:00
Tulir Asokan
973f80d7a7 Fix accepting group invites in encrypted rooms 2022-03-14 13:15:52 +02:00
Tulir Asokan
e31788541a Check for WhatsApp web updates on bridge startup 2022-03-12 20:05:57 +02:00
Tulir Asokan
c82a96dccc Handle incoming reaction removals 2022-03-12 19:47:47 +02:00
Tulir Asokan
766e6a5130 Invite bot when user enables encryption in DM portal 2022-03-11 20:11:27 +02:00
Tulir Asokan
7322f78d56 Delete connection and update JID map on remote logout 2022-03-10 22:21:24 +02:00
Sumner Evans
4fd07a2646
Merge pull request #457 from mautrix/sumner/bri-2349
segment: add for provisioning API
2022-03-10 11:57:59 -07:00
Sumner Evans
a68bce35fc
segment: add tracking to provisioning API
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2022-03-10 11:55:04 -07:00
Tulir Asokan
031d712905 Update whatsmeow 2022-03-09 16:44:25 +02:00
Tulir Asokan
621ecc0d62 Update dependencies 2022-03-08 14:11:21 +02:00
Tulir Asokan
dcfa9e1b34 Update hacky workaround for transient disconnect states
The previous version didn't handle the case where the reconnect is what
triggers the `wa-phone-offline` state in the first place.
2022-03-08 12:51:26 +02:00
Tulir Asokan
9b6ca8d6f1 Don't send normal transient disconnect state when phone is offline 2022-03-07 22:45:19 +02:00
Tulir Asokan
1eb210c249 Add support for bridging reactions 2022-03-05 21:22:31 +02:00
Tulir Asokan
601864131e Disable file logging in Docker by default
To enable it, use a custom path that points at a writable volume
2022-03-04 11:08:30 +02:00
Nick Mills-Barrett
2e01dc4bd4
Only change the data directory ownership on Docker start 2022-03-03 18:17:54 +02:00