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

71 commits

Author SHA1 Message Date
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
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
3410938890 Fix warning 2023-08-17 12:34:10 -04:00
Scott Weber
00195615da Major logging cleanup and full move to zerolog 2023-07-27 18:13:33 -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
df8b0db093 Double puppet is working! 2023-07-19 14:54:16 -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
82634e2a15 Fetching encrypted profile data and ProfileKeyCredential!
Had to use the right UUID, and convert it to bytes :S
2023-06-29 21:36:09 -04:00
Scott Weber
68c4f2085d Successfully create and send credential request, but it doesn't help get a profile 2023-06-29 17:12:47 -04:00
Scott Weber
f7b62677ba Add a new unauthed websocket, and use it to fetch parts of a profile
but the server won't even send me the encrypted bits yet
2023-06-26 10:43:33 -04:00
Scott Weber
bd401ca051 Fetch a profile without any encrypted fields 2023-06-25 17:21:19 -04:00
Scott Weber
709c5e8dae Rewrite websocket handling again 2023-06-09 12:28:19 -04:00
Scott Weber
4c8a4dc87c Receiving (sealed sender) and sending (not sealed sender) in signalmeow! 2023-05-31 16:43:08 -04:00
Scott Weber
60d2f1cfdb Improve response sending 2023-05-09 17:39:47 -04:00
Scott Weber
67c558853f Receiving unencrypted messages, but not in real time 2023-05-09 16:34:16 -04:00
Scott Weber
f91b2e4d0a Successfully open message receiving WS, but nothing comes down it 2023-05-08 14:47:00 -04:00
Scott Weber
e44fb2d95a Tidy up URLs 2023-05-08 13:47:01 -04:00