1
0
Fork 0
mirror of https://github.com/mautrix/signal.git synced 2026-05-15 05:36:53 -04:00
Commit graph

1,109 commits

Author SHA1 Message Date
Tulir Asokan
0c009e58fa Merge remote-tracking branch 'element-hq/go/fix-contact-profile-key-column-type' 2023-12-17 14:52:37 +02:00
Scott Weber
63b24c86d1 Send BAD_CREDENTIALS on signalgo migration
Or really any time Signal device credentials should be in signalmeow DB
but aren't there.
2023-12-14 14:54:18 +00:00
Scott Weber
3953789ef0 Support kyber prekeys and use them during provisioning 2023-12-13 22:15:41 +00:00
Scott Weber
607f33e069 New provisioning flow (for /v1/devices/link)
Note: this returns 422, I think I need to include kyber prekeys
2023-12-12 22:54:38 +00:00
Tulir Asokan
538aa7a477 Switch to shared CI config 2023-12-12 18:18:35 +02:00
Tulir Asokan
8523eec2ab Add missing cflag 2023-12-12 16:37:44 +02:00
Tulir Asokan
1b08c300cc Build fully static binaries and use Alpine for docker image 2023-12-12 16:36:17 +02:00
Tulir Asokan
d9db092d8f Update .gitignore 2023-12-11 16:11:24 +02:00
Scott Weber
55318033fd Work around GCC bug to fix Linux build (breaks clang build on macOS though) 2023-12-11 04:11:20 +00:00
Scott Weber
e6eb03901b Update GH workflow with new libsignal version 2023-12-10 21:53:17 -05:00
Scott Weber
9ea94243a9 Update bridge to use libsignal v0.36.1 and latest protobufs
- Update libsignal to v0.36.1 and run protobuf fetch and update
- Update libsignalgo to work with libsignal v0.36.1
2023-12-10 21:39:43 -05:00
Andrew Ferrazzutti
bdc2fec369 Refactor for code reuse 2023-12-07 00:41:59 -05:00
Andrew Ferrazzutti
dd48c404c2 Bridge descriptions from Signal 2023-12-07 00:41:59 -05:00
Toni Spets
0ce75e293e Expose debug API with pprof
Runs along the provisioning API with same authentication.
2023-12-05 12:33:47 +02:00
Scott Weber
7b674397e3 Revert "Clean up extra ghosts that may be left from double puppetting problems"
This reverts commit 5d74b17856 and commit 3c0129cb38.
2023-12-01 14:52:56 -05:00
Scott Weber
5d74b17856 Run CleanUpExtraGhosts outside of the user lock 2023-12-01 12:30:40 -05:00
Scott Weber
3c0129cb38 Clean up extra ghosts that may be left from double puppetting problems 2023-12-01 12:12:45 -05: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
068af1df27 Don't crash on messages from Signal with formatting 2023-11-28 20:09:39 -05:00
Andrew Ferrazzutti
6f378d1b99 Upgrade only for postgres 2023-11-24 11:41:24 -05:00
Andrew Ferrazzutti
afab8bf265 Set contact table profile key type to bytea
Make it use the same data type as the profile keys table.
This fixes UTF encoding errors when using a postgres store.
2023-11-24 01:40:31 -05:00
Andrew Ferrazzutti
468f655a6f Ensure user is invited to portals on update
because if a user ever leaves a portal, there is no obvious way for them
to rejoin it.
2023-11-23 15:52:37 -05:00
Scott Weber
8f3f50eb87 Handle ws == nil, and ws reconnect loops 2023-11-22 23:06:41 -05:00
Scott Weber
e20d746376 Increase WS read limit to 1MB from default of 32KB 2023-11-22 21:59:55 -05:00
Scott Weber
6068d25fc9 Ensure double puppetting is started for incoming messages (if enabled) 2023-11-21 18:17:42 -05:00
Andrew Ferrazzutti
fa7a34ac15
Scope reply events to current portal & quoted user (#17)
* Scope reply events to current portal & quoted user

When bridging a Signal quote to a Matrix reply, consider events only
from the portal in which the reply is being bridged when searching for
the replied-to message.

Also refuse to bridge the quote if there is no puppet for the Signal
user who sent the message that was quoted.

* Don't check quoted sender puppet
2023-11-21 15:09:12 -05:00
Scott Weber
d03b07448f nil check in resolveIdentifier 2023-11-21 14:53:31 -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
ece2eed474 Make provisioning API safer and clear device keys before storing prekeys 2023-11-19 07:36:21 -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
ae8de47390 Serialize access to encryption per bridge user
To prevent races in incrementing ratchets and such
2023-11-15 13:41:11 -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
1ffe5eaa26
Always bridge own inbound group messages (#10)
Use the user's Signal puppet to bridge them if no custom puppet is set
2023-11-14 16:15:32 -05:00
Andrew Ferrazzutti
edf04da7fc
Allow debug build & remote debugging (#13)
* Allow debug build & remote debugging

* Allow debug image to wait for connection
2023-11-14 16:03:17 -05:00
Andrew Ferrazzutti
7f91feacf3
Use filename title as body if caption is empty (#16) 2023-11-14 15:54:50 -05:00
Scott Weber
1f49819b85 Clean up some references to Whatsapp 2023-11-14 15:52:05 -05:00
Andrew Ferrazzutti
fa6a17ed58
Clean up notice for login timeouts (#12)
This assumes an "EOF" error is always a timeout
2023-11-14 15:48:40 -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
9df4ed6ed3 Make error more generic to not break error reporting 2023-11-14 15:12:22 -05:00
Andrew Ferrazzutti
1dfd08f166
Deduplicate inbound messages (#15) 2023-11-14 14:37:33 -05:00
Andrew Ferrazzutti
20cc27a297
Add Prometheus metrics (#8) 2023-11-14 14:27:56 -05:00
Scott Weber
8c11301398 Remove warning 2023-11-14 14:25:00 -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
aeaec30086 Always store the same timestamp in the DB as was sent to Signal 2023-11-09 13:37:31 -05:00
Scott Weber
dba988356b Include the RoomID of the room we just created 2023-11-09 12:25:56 -05:00
Scott Weber
18f4676403 Implement SNC API for starting chats with people the bridge knows 2023-11-09 12:20:30 -05:00