Tulir Asokan
a0fbdee4c0
Fix handling sync messages in group
2024-01-02 19:22:16 +02:00
Tulir Asokan
9efe31d789
Refactor Signal -> Matrix message handling
...
Also add support for edits
2024-01-02 19:04:45 +02:00
Tulir Asokan
35db0abe8b
Refactor database tables and query wrappers ( #402 )
...
* Change most columns to `NOT NULL`, including primary keys
(because SQLite).
* Change columns only storing signal user IDs (portal receiver, message
sender, user uuid) to use the `uuid` type instead of `TEXT`.
* Drop chat ID from message table primary key.
* Add part index to message table to replace timestamp hack for storing
multiple parts of the same message.
* Change query wrappers to use new QureyHelper struct in dbutil, and
pass contexts and errors everywhere.
As a part of changing the portal receiver from phone number to uuid,
old portals whose receiver isn't logged in anymore may be discarded.
The discarded portals will be stored in the lost_portals table for
cleanup or recovery.
2023-12-31 16:12:58 +02:00
Tulir Asokan
b7c0e6ee74
Fix panic if bridge is stopped before websocket connects
2023-12-30 21:01:37 +01:00
Tulir Asokan
d78e006bc6
Fix panics when receiving stickers
2023-12-26 19:39:01 +01:00
Tulir Asokan
5efa86b627
Fix method receiver name
2023-12-22 13:50:56 +02:00
Tulir Asokan
df03fcdeb9
Fix over-indentation of incoming request handler
2023-12-22 13:49:38 +02:00
Tulir Asokan
ae60c41282
Actually update protobufs
2023-12-21 18:06:58 +02:00
Tulir Asokan
61ef8904e9
Add support for Signal -> Matrix formatting
2023-12-17 22:50:09 +02:00
Tulir Asokan
06d0939645
Hack message conversion to make captions optional
2023-12-17 18:14:09 +02:00
Tulir Asokan
5e1025cdca
Fix displayname template and add use contact avatar option
2023-12-17 17:32:20 +02:00
Tulir Asokan
49ce1f530c
Add copyright headers
2023-12-17 15:54:35 +02:00
Tulir Asokan
61841ca4f1
Organize imports
2023-12-17 15:21:21 +02:00
Scott Weber
7d487dbd2f
Hack to fix bridging multiple images from Signal
...
and include very basic and buggy support for reacting to them
2023-11-29 13:07:20 -05:00
Scott Weber
b2da336627
Perform "ClearKeysAndDisconnect" on prekey decryption errors
...
Might be a bit aggressive, but necessary because right now there are a
bunch of bridges with broken prekeys.
Required extensive work on disconnect/reconnect logic.
2023-11-20 22:28:49 -05:00
Scott Weber
cef8e3049a
Got my logic backwards
2023-11-19 20:22:35 -05:00
Scott Weber
62274973fb
Ignore contact if it doesn't have a valid UUID
...
It seems we sometimes get UUIDs formated like "PNI:a1b2c3...", they
could probably be parsed into some sort of PNI contact but just drop
them for now
2023-11-19 10:48:51 -05:00
Scott Weber
16787a28b5
Don't try to save contact with no UUID
...
Also reduce some contact logging
2023-11-17 12:01:35 -05:00
Scott Weber
d308f27e61
Request contacts from Signal device when creating new Matrix room
2023-11-15 10:58:42 -05:00
Andrew Ferrazzutti
353d6c1b7c
Don't break inbound bridging on DMing own account ( #11 )
...
Without this, sending a message in the Note to Self portal / DM with
your own Signal account breaks all subsequent inbound bridging.
2023-11-14 15:43:37 -05:00
Scott Weber
79047202e7
Basic support for receiving Signal contact cards
2023-11-13 14:33:26 -05:00
Andrew Ferrazzutti
71254782af
Fix nil dereferences ( #14 )
...
* Return before dereferencing nil usmc
* Return before dereferencing nil msg
2023-11-13 09:24:10 -05:00
Scott Weber
46d5b4e03c
If bridge has upgraded and user tries to send a message before logging back in, send BAD_CREDENTIALS
2023-11-10 14:05:09 -05:00
Scott Weber
b7bcdfdd39
Sender envelopes include the sender e164!!! KEEP THEM
2023-11-08 15:54:18 -05:00
Scott Weber
aee115d81f
Add "contacts", and layer on top of profiles
2023-11-07 23:08:31 -05:00
Scott Weber
da5eb0c8e7
Add TransientDisconnect debouncing, and fix BridgeState sending bug
2023-11-03 16:55:02 -04:00
Scott Weber
d9cb00f9ff
Fix outgoing videos, voice notes and files
2023-10-26 14:39:27 -04:00
Scott Weber
4966bda94a
Disappearing messages!
2023-10-22 23:39:59 -04:00
Scott Weber
906d0c82c9
Add logging to try and figure out why CONNECTED state wasn't sent
2023-10-19 09:39:03 -04:00
Scott Weber
8b991e0ad6
Stop trying to handle SS plaintext
...
It's a DecryptionErrorMessage to retry key sending for SenderKey
messages I think, so not needed right now. Also the crazy scenario my
devices were in that allowed me to test this is now resolved so I can't
easily test this anymore.
2023-10-11 18:14:42 -04:00
Scott Weber
984699760f
Try unmarshalling SS plaintext message again
2023-10-11 14:55:04 -04:00
Scott Weber
58b92be3ca
Don't send delivered receipts so aggressively, and try parsing SS plaintext
2023-10-11 14:47:11 -04:00
Scott Weber
5d00781973
Handle delivery receipts and forward to matrix as MSS
2023-10-02 00:18:36 -04:00
Scott Weber
810c83234f
Handle sync read messages from other signal devices
2023-10-01 23:30:12 -04:00
Scott Weber
8c03c759b6
Bridging read receipts signal -> matrix
2023-10-01 12:00:30 -04:00
Scott Weber
d672272cad
Lowercase incoming reaction target author UUID
2023-09-28 19:41:10 -04:00
Scott Weber
d22ffc00f6
Send delivery receipts
2023-09-28 00:19:22 -04:00
Scott Weber
5ebb5ff817
Handle incoming calls with a notice
2023-09-27 23:31:24 -04:00
Scott Weber
a648f79eaf
Group avatars
2023-09-27 21:44:37 -04:00
Scott Weber
11bc54e976
Bridge typing notification signal -> matrix
2023-09-27 15:05:18 -04:00
Scott Weber
2142a9b3c2
Don't emit bridge state during clean shutdown
2023-09-27 14:25:02 -04:00
Scott Weber
03780d9761
Initial stab at provisioning API
2023-09-19 23:41:32 -04:00
Scott Weber
697cf63df1
Get contacts (for profile keys) on connect!
...
Send a contact sync request on initial websocket connection, then parse
the response, grab profile keys and store them (not doing anything with
other contact info and avatars yet).
Also fix attachment decryption - was ignoring extra padding at the end
of the buffer, which image formats were fine with but unmarshalling a
protobuf was not..
2023-09-19 19:06:41 -04:00
John Newman
b50649c04a
Implement receiving stickers
2023-09-19 21:13:25 +01:00
Scott Weber
9b18117029
Replace "master key" group identfiers with actual GroupIdentifier
...
Everywhere.
And save them in the DB so we can still look up master keys when needed
2023-09-14 16:33:40 -04:00
Scott Weber
12f7bb9df1
Make message sending more robust, particularly in the face of bad networking
2023-09-06 00:47:08 -04:00
Scott Weber
2007559b64
Bridge mentions from signal -> matrix (no HTML formatting yet)
2023-09-05 09:11:29 -04:00
Scott Weber
df9dc128f4
Bridge replies signal -> matrix
2023-09-04 22:00:03 -04:00
Scott Weber
f52f236780
Sending images!
2023-08-31 12:58:18 -04:00
Scott Weber
e70c6f038a
Bridge redactions signal -> matrix
2023-08-28 21:39:26 -04:00