1
0
Fork 0
mirror of https://github.com/mautrix/signal.git synced 2026-05-14 21:26:54 -04:00
Commit graph

1,042 commits

Author SHA1 Message Date
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
Scott Weber
c0bd0710c5 PM bridgebot command that just looks up phone numbers that the bridge has already seen 2023-11-08 16:24:45 -05:00
Scott Weber
b7bcdfdd39 Sender envelopes include the sender e164!!! KEEP THEM 2023-11-08 15:54:18 -05:00
Scott Weber
7007a36c90 Handle updating puppet with contact info even if profile fetch fails 2023-11-08 12:08:40 -05:00
Scott Weber
aee115d81f Add "contacts", and layer on top of profiles 2023-11-07 23:08:31 -05:00
Scott Weber
dffed61b1d Fix comments 2023-11-05 10:15:29 -05:00
Scott Weber
da5eb0c8e7 Add TransientDisconnect debouncing, and fix BridgeState sending bug 2023-11-03 16:55:02 -04:00
Scott Weber
ccd48585f0 Don't send CONNECTING/BAD_CREDS if bridge has no SignalDevice 2023-11-02 09:48:39 -04:00
Scott Weber
870e776422 Don't crash when sending in a group by myself 2023-11-01 11:57:16 -04:00
Scott Weber
db01419c8c Now try sending 400, just like the old bridge (and the old CND would accept quietly) 2023-11-01 10:58:02 -04:00
Scott Weber
8850c90738 Try being chill 2023-11-01 09:59:49 -04:00
Scott Weber
e5095e5419 Tweak wait timeout to 45s (desktop retries at 30s) 2023-11-01 00:46:22 -04:00
Scott Weber
c7b23b8174 Fix waitForScan error, and more error messages 2023-11-01 00:34:07 -04:00
Scott Weber
36da9e6e3b Fix up contexts and error messages 2023-11-01 00:23:14 -04:00
Scott Weber
b04a919c65 Handle restarting provisioning session 2023-11-01 00:10:36 -04:00
Scott Weber
89c540496c Initialize our map 2023-10-31 23:44:54 -04:00
Scott Weber
4064dba3f5 Provisioning API fixes 2023-10-31 23:31:18 -04:00
Scott Weber
a09cec4a81
Update go.yml to fix test build
Only updated lint section last time
2023-10-30 12:28:51 -04:00