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

605 commits

Author SHA1 Message Date
Scott Weber
9122c32e66 Bridge reactions (but not reaction redactions) from matrix -> signal
Also some substantial message sending refactoring
2023-08-28 17:15:25 -04:00
Scott Weber
1c50f8c1e1 Bridging reactions Signal -> Matrix (but not redacting them) 2023-08-27 16:05:05 -04:00
Scott Weber
bcb0041004 Bridge image size and filename (to make captions work) 2023-08-25 13:53:37 -04:00
Scott Weber
eb3ebdd8ff Can receive a message! (But lots to tidy up here) 2023-08-25 12:56:39 -04:00
Scott Weber
f3fad459f7 More robust bridge states, partial logout support, hopefully more robust mautrix interface code 2023-08-24 15:06:39 -04:00
Scott Weber
2cb24d197b Overhaul SignalWebsocket error handling and hook up to BridgeState 2023-08-22 11:54:35 -04:00
Scott Weber
0aa0072869 Strip non-printable characters from group titles 2023-08-18 14:20:23 -04:00
Scott Weber
30aa6b41c0 Fix deadlock in websocket code
- Readloop goroutine gets a new request (incoming message), sends to
  incoming loop
- Incoming request loop goroutine calls incoming message handler
- Incoming message handler needs group info, sends a WS request
- Sendloop goroutine gets request, sends on WS, stores response channel
  in map
- Incoming message handler is blocked waiting on response on it's
  response channel
- Readloop gets some other request, tries to send to incoming loop, but
  gets blocked on sending to incoming request channel because it's
  unbuffered and that goroutine is still blocked waiting on group info
- Server responds with response to group info request, but readloop is
  blocked now forever

The fix: give the incomingRequestChan a large (10000) buffer. Now:

- Readloop goroutine gets a new request (incoming message), sends to
  incoming loop
- Incoming request loop goroutine calls incoming message handler
- Incoming message handler needs group info, sends a WS request
- Sendloop goroutine gets request, sends on WS, stores response channel
  in map
- Incoming message handler is blocked waiting on response on it's
  response channel
- Readloop gets some other request and successfully buffers it in the
  incoming request channel
- Server responds with response to group info request, readloop is *not*
  blocked, and can pass the response down the response channel that the
  incoming message handler is blocked on, and it can finish up
- Incoming request loop is free to continue processing incoming requests
2023-08-18 12:41:21 -04:00
Scott Weber
c6586f614a String extraneous whitespace from group titles 2023-08-17 13:45:19 -04:00
Scott Weber
0b40b6ed8d Change check for nil puppet 2023-08-17 13:32:51 -04:00
Scott Weber
3410938890 Fix warning 2023-08-17 12:34:10 -04:00
Scott Weber
ec994fe4c5 Undo part of double puppet fix 2023-08-17 01:42:00 -04:00
Scott Weber
dc317afe48 Fix double puppetting (at least partially) 2023-08-17 00:58:58 -04:00
Scott Weber
d8913fd523 Gotta unpad decrypted ProvisionMessage with PKCS7 2023-08-16 23:55:17 -04:00
Scott Weber
0bf1cff531 Handle 410 GONE when sending a message 2023-08-16 19:18:11 -04:00
Scott Weber
5b102b6480 Prevent panic if we can't find profileKey 2023-08-16 15:28:47 -04:00
Scott Weber
b5dc4c8a9d Don't send multiple sync messages on group message send 2023-08-15 21:20:38 -04:00
Scott Weber
7a35632eed Fix test 2023-08-15 21:20:21 -04:00
Scott Weber
1157766d10 Add stub for kyber prekey store to fix tests 2023-07-31 21:25:45 -07:00
Scott Weber
85e378eb9f Move printing content fields to separate goroutine 2023-07-31 17:43:22 -07:00
Scott Weber
f60b7dc431 Stub KyberPreKeyStore implementation to hopefully fix prekey decrypt null pointer error 2023-07-28 14:21:14 -04:00
Scott Weber
00195615da Major logging cleanup and full move to zerolog 2023-07-27 18:13:33 -04:00
Scott Weber
d1a21462ce Fix tests (note: tests are still failing due to prekey null thing) 2023-07-26 11:12:12 -04:00
Scott Weber
b0bd6e8e9f I think this fixes the prekey null pointer problem
Well enough anyway. When the old prekeyDecrypt fails due to null
pointer, fall through to sealedSenderDecrypt, which usually seems to be
able to decrypt it fine
2023-07-26 10:11:31 -04:00
Scott Weber
099a58a31b Fixes: FFI problems, logging, profile fetch error caching 2023-07-26 10:03:28 -04:00
Scott Weber
8294eedbe3 Disable routing through mitm-proxy 2023-07-24 10:49:32 -04:00
Scott Weber
d111086d44 Add puppets to portal on room creation
Also replace /0 with space in profile names
2023-07-23 16:32:17 -04:00
Scott Weber
862a875cbf Populate group chat rooms with members 2023-07-23 15:34:09 -04:00
Scott Weber
5f9c802d13 Set profile names when a message comes in 2023-07-21 16:56:42 -04:00
Scott Weber
41223f504d Cache group data and set portals with name and topic 2023-07-21 16:18:32 -04:00
Scott Weber
e5db9a0be2 Docker build! 2023-07-21 14:06:41 -04:00
Scott Weber
b65d275495 Update update-ffi.sh and replace build.sh with Makefile 2023-07-21 11:17:23 -04:00
Scott Weber
a0fc08db7d Added libsignal as a submodule 2023-07-21 10:45:59 -04:00
Scott Weber
105a081a1b Make linting pass 2023-07-20 13:05:26 -04:00
Scott Weber
6ea41df16f Group send should send to more people now 2023-07-19 17:48:59 -04:00
Scott Weber
6057cf5300 I think this handles send message results better 2023-07-19 17:17:06 -04:00
Scott Weber
e5bca2463d Signal sync messages mostly working 2023-07-19 15:49:34 -04:00
Scott Weber
c56a3508c3 Group double puppetting is working 2023-07-19 15:23:01 -04:00
Scott Weber
df8b0db093 Double puppet is working! 2023-07-19 14:54:16 -04:00
Scott Weber
196516a7a6 Send SealedSender via unauthed WS when possible
Seems to get around 428 problems and now group sends work!?
2023-07-19 01:01:28 -04:00
Scott Weber
6cd64a86d2 428 message send response handler that doesn't work 2023-07-19 00:17:08 -04:00
Scott Weber
b9b021a90b I think this sends to a group, but i got spam blocked
(rate limited with 428 "pushChallenge")
2023-07-18 23:45:42 -04:00
Scott Weber
9090da3643 Decrypt group data 2023-07-17 16:06:48 -04:00
Scott Weber
f20a67d6ff Refactor out most packages, and successfully decrypt group title :O 2023-07-16 23:31:38 -04:00
Scott Weber
58e64d885d Fetching group metadata from server!
Had to use storage.signal.org, and had to ignore a very misleading
AuthCredentialPresentation lengths in the FFI header, it was leading me
to improperly truncate the presentation before sending >:(
2023-07-16 17:33:28 -04:00
Scott Weber
0b9df4ffde Successfully fetching and unmunging group auth credentials 2023-07-14 15:00:25 -04:00
Scott Weber
84e7ab7f85 Fix end of files (linter) 2023-07-10 11:45:45 -04:00
Scott Weber
c8efd9de16 Send decrypted group messages to a new portal (and get correct puppets!) 2023-07-10 11:28:23 -04:00
Scott Weber
2755008f4b Decrypting group messages!!! (but going to the wrong portal) 2023-07-10 00:07:44 -04:00
Scott Weber
58afee173f Tidy incoming message handler and fix sender_key_store 2023-07-09 23:38:13 -04:00