Tulir Asokan
31c48d9e83
Add trace log with raw Signal message data
2024-01-03 00:16:19 +02:00
Tulir Asokan
9b459150c4
Refactor Matrix -> Signal message handling
2024-01-03 00:16:19 +02:00
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
5842da7c4a
Add Signal root CA cert
2023-12-31 17:14:22 +01: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
4dc2cc37c3
Disable broken tests in libsignalgo
2023-12-30 21:00:11 +01:00
Tulir Asokan
5c5c822624
Add support for device names
2023-12-30 21:00:11 +01:00
Tulir Asokan
bb94d392a7
Improve ping command
2023-12-30 20:53:47 +01:00
Sumner Evans
9152313cde
modules: un-modulify libsignalgo and signalmeow
...
I don't see any reason why they should have their own go.mod. I think
this is legacy from when I had them in separate repositories.
If we ever need to split those packages out into their own repo, we can
just:
1. Copy the directories to a new repo
2. Copy the go.mod/go.sum files
3. Run `go mod tidy` in this repo and the new repo.
This commit also removes the go.work and go.work.sum files.
Signed-off-by: Sumner Evans <me@sumnerevans.com>
2023-12-29 18:33:31 -07:00
Tulir Asokan
175fde6a94
Fix some tests broken by kyber prekeys
...
[skip cd]
2023-12-28 17:53:37 +01:00
Tulir Asokan
38e0c5fca6
Partially fix replying to files
2023-12-26 19:53:49 +01:00
Tulir Asokan
d78e006bc6
Fix panics when receiving stickers
2023-12-26 19:39:01 +01:00
Tulir Asokan
c6d22f403b
Fix sending captions. Fixes #393
2023-12-26 17:56:43 +01:00
Tulir Asokan
7186350d10
Small consistency fixes
2023-12-22 14:56:31 +02:00
Tulir Asokan
3a3c7299fe
Remove custom UUID type
2023-12-22 14:48:47 +02: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
8260ba1559
Add support for Matrix -> Signal formatting
2023-12-21 16:57:21 +02:00
Tulir Asokan
f79668dd4b
Update readme and other things
2023-12-18 02:05:18 +02:00
Tulir Asokan
54aab69650
Merge remote-tracking branch 'AndrewFerr/inbound-descriptions'
2023-12-18 01:02:29 +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
ea6b2df562
Fix contact avatar mime types
2023-12-17 17:39:40 +02:00
Tulir Asokan
5e1025cdca
Fix displayname template and add use contact avatar option
2023-12-17 17:32:20 +02:00
Tulir Asokan
60b9a4577b
Add build flags to fix macOS build
2023-12-17 16:13:39 +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
Tulir Asokan
396071be12
Update dependencies
2023-12-17 15:16:18 +02:00
Tulir Asokan
d73ba502ef
Switch signalmeow upgrades to dbutil
2023-12-17 15:14:31 +02:00
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
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
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
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
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
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
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