mirror of
https://github.com/mautrix/signal.git
synced 2026-11-10 08:09:18 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7b8cab57f |
341 changed files with 31871 additions and 104683 deletions
8
.envrc
Normal file
8
.envrc
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
if [[ $(uname -s) == "Linux" && $(uname --kernel-version | grep "NixOS") ]]; then
|
||||||
|
echo "The best OS (NixOS) has been detected. Using nice tools."
|
||||||
|
if ! has nix_direnv_version || ! nix_direnv_version 3.0.0; then
|
||||||
|
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.0/direnvrc" "sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg="
|
||||||
|
fi
|
||||||
|
|
||||||
|
use flake
|
||||||
|
fi
|
||||||
2
.gitattributes
vendored
2
.gitattributes
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
*.pb.go linguist-generated=true
|
|
||||||
*.pb.raw binary linguist-generated=true
|
|
||||||
15
.github/ISSUE_TEMPLATE/bug.md
vendored
15
.github/ISSUE_TEMPLATE/bug.md
vendored
|
|
@ -1,18 +1,7 @@
|
||||||
---
|
---
|
||||||
name: Bug report
|
name: Bug report
|
||||||
about: If something is definitely wrong in the bridge (rather than just a setup issue),
|
about: If something is definitely wrong in the bridge (rather than just a setup issue),
|
||||||
file a bug report. Remember to include relevant logs. Asking in the Matrix room first
|
file a bug report. Remember to include relevant logs.
|
||||||
is strongly recommended.
|
labels: bug
|
||||||
type: Bug
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Include relevant logs, the bridge version and other important details here -->
|
|
||||||
|
|
||||||
### Checklist
|
|
||||||
|
|
||||||
<!-- All items below are mandatory. Issues not following the rules may be closed without comment. -->
|
|
||||||
|
|
||||||
* [ ] This is an actual bug, not just a setup issue (see the [troubleshooting docs](https://docs.mau.fi/bridges/general/troubleshooting.html) or ask in the Matrix room for setup help).
|
|
||||||
* [ ] I am certain that sufficient information is included. Ask in the Matrix room first if not.
|
|
||||||
* [ ] The bug is still present on the main branch. The `!signal version` command output is: ``
|
|
||||||
|
|
|
||||||
2
.github/ISSUE_TEMPLATE/enhancement.md
vendored
2
.github/ISSUE_TEMPLATE/enhancement.md
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
name: Enhancement request
|
name: Enhancement request
|
||||||
about: Submit a feature request or other suggestion
|
about: Submit a feature request or other suggestion
|
||||||
type: Feature
|
labels: enhancement
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
35
.github/workflows/go.yml
vendored
35
.github/workflows/go.yml
vendored
|
|
@ -3,24 +3,18 @@ name: Go
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GOTOOLCHAIN: local
|
LIBSIGNAL_REF: "v0.36.1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
go-version: ["1.26", "1.27"]
|
|
||||||
name: Lint ${{ matrix.go-version == '1.27' && '(latest)' || '(old)' }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v7
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: "1.21"
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: Install libolm
|
- name: Install libolm
|
||||||
|
|
@ -30,33 +24,31 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
go install golang.org/x/tools/cmd/goimports@latest
|
go install golang.org/x/tools/cmd/goimports@latest
|
||||||
go install honnef.co/go/tools/cmd/staticcheck@latest
|
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||||
go install github.com/beeper/pre-commit-go/bridgelint@latest
|
|
||||||
export PATH="$HOME/go/bin:$PATH"
|
export PATH="$HOME/go/bin:$PATH"
|
||||||
|
|
||||||
- name: Run pre-commit
|
- name: Run pre-commit
|
||||||
uses: pre-commit/action@v3.0.1
|
uses: pre-commit/action@v3.0.0
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
go-version: ["1.26", "1.27"]
|
go-version: ["1.20", "1.21"]
|
||||||
name: Test ${{ matrix.go-version == '1.27' && '(latest)' || '(old)' }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v7
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
#- name: Set up gotestfmt
|
- name: Set up gotestfmt
|
||||||
# uses: GoTestTools/gotestfmt-action@v2
|
uses: GoTestTools/gotestfmt-action@v2
|
||||||
# with:
|
with:
|
||||||
# token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Install libolm
|
- name: Install libolm
|
||||||
run: sudo apt-get install libolm-dev
|
run: sudo apt-get install libolm-dev
|
||||||
|
|
@ -69,5 +61,4 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
export LIBRARY_PATH=.
|
export LIBRARY_PATH=.
|
||||||
#go test -v -json ./... -cover | gotestfmt
|
go test -v -json ./... -cover | gotestfmt
|
||||||
go test ./...
|
|
||||||
|
|
|
||||||
29
.github/workflows/stale.yml
vendored
29
.github/workflows/stale.yml
vendored
|
|
@ -1,29 +0,0 @@
|
||||||
name: 'Lock old issues'
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 12 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
# pull-requests: write
|
|
||||||
# discussions: write
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: lock-threads
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lock-stale:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: dessant/lock-threads@v6
|
|
||||||
id: lock
|
|
||||||
with:
|
|
||||||
issue-inactive-days: 90
|
|
||||||
process-only: issues
|
|
||||||
- name: Log processed threads
|
|
||||||
run: |
|
|
||||||
if [ '${{ steps.lock.outputs.issues }}' ]; then
|
|
||||||
echo "Issues:" && echo '${{ steps.lock.outputs.issues }}' | jq -r '.[] | "https://github.com/\(.owner)/\(.repo)/issues/\(.issue_number)"'
|
|
||||||
fi
|
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -6,7 +6,6 @@
|
||||||
*.log*
|
*.log*
|
||||||
|
|
||||||
/mautrix-signal
|
/mautrix-signal
|
||||||
|
/mautrix-signalgo
|
||||||
/start
|
/start
|
||||||
/libsignal_ffi.a
|
/libsignal_ffi.a
|
||||||
|
|
||||||
.idea
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
include:
|
include:
|
||||||
- project: 'mautrix/ci'
|
- project: 'mautrix/ci'
|
||||||
file: '/gov2-as-default.yml'
|
file: '/go.yml'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
BUILDER_IMAGE: dock.mau.dev/tulir/gomuks-build-docker/signal
|
BUILDER_IMAGE: dock.mau.dev/tulir/gomuks-build-docker/signal
|
||||||
|
BINARY_NAME: mautrix-signal
|
||||||
|
|
||||||
# 32-bit arm builds aren't supported
|
# 32-bit arm builds aren't supported
|
||||||
build arm:
|
build arm:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v6.0.0
|
rev: v4.5.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
exclude_types: [markdown]
|
exclude_types: [markdown]
|
||||||
|
|
@ -9,23 +9,10 @@ repos:
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
|
|
||||||
- repo: https://github.com/tekwizely/pre-commit-golang
|
- repo: https://github.com/tekwizely/pre-commit-golang
|
||||||
rev: v1.0.0-rc.4
|
rev: v1.0.0-rc.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: go-imports
|
- id: go-imports
|
||||||
exclude: "pb\\.go$"
|
exclude: "pb\\.go$"
|
||||||
args:
|
|
||||||
- "-local"
|
|
||||||
- "go.mau.fi/mautrix-signal"
|
|
||||||
- "-w"
|
|
||||||
- id: go-vet-mod
|
- id: go-vet-mod
|
||||||
# - id: go-staticcheck-repo-mod
|
#- id: go-staticcheck-repo-mod
|
||||||
# TODO: reenable this and fix all the problems
|
# TODO: reenable this and fix all the problems
|
||||||
|
|
||||||
- repo: https://github.com/beeper/pre-commit-go
|
|
||||||
rev: v0.5.0
|
|
||||||
hooks:
|
|
||||||
- id: zerolog-ban-msgf
|
|
||||||
- id: zerolog-use-stringer
|
|
||||||
- id: bridgelint
|
|
||||||
language: system
|
|
||||||
verbose: true
|
|
||||||
|
|
|
||||||
345
CHANGELOG.md
345
CHANGELOG.md
|
|
@ -1,347 +1,10 @@
|
||||||
# v26.11 (unreleased)
|
# v0.5.0 (unreleased)
|
||||||
|
|
||||||
* Updated libsignal to v0.106.1.
|
|
||||||
* Added support for sending more than 2048 characters of text to Signal by
|
|
||||||
uploading the rest of the text as an attachment, like official clients do.
|
|
||||||
* Added automatic retrying of group message sends if the server returns a 500
|
|
||||||
or 503 error.
|
|
||||||
* Added support for encrypting direct media with FLOE ([MSC4571]).
|
|
||||||
* Fixed memory leak in libsignal store implementation.
|
|
||||||
|
|
||||||
[MSC4571]: https://github.com/matrix-org/matrix-spec-proposals/pull/4571
|
|
||||||
|
|
||||||
# v26.10
|
|
||||||
|
|
||||||
* Updated libsignal to v0.105.0.
|
|
||||||
* Added support for phonenumberless accounts.
|
|
||||||
* Added support for starting chats with usernames and username links.
|
|
||||||
* Added support for blocking and unblocking users on Signal.
|
|
||||||
* Added support for new view-limited media interface in bridgev2.
|
|
||||||
* Added proper sender certificate validation.
|
|
||||||
* Changed storage sync to only sync once if repeated fetch latest notices are
|
|
||||||
received.
|
|
||||||
* Fixed contact syncs not happening even when `sync_contacts_on_startup` was
|
|
||||||
set to true.
|
|
||||||
* Fixed Signal encryption using wrong timestamp precision for session expiry.
|
|
||||||
* Fixed sender key sharing not handling removed users properly.
|
|
||||||
* Fixed handling retry receipts with no sender key info.
|
|
||||||
* Fixed deadlock in prekey upload loop if the client gets logged out.
|
|
||||||
* Fixed infinite loop when importing sticker packs with duplicate emoji
|
|
||||||
shortcuts.
|
|
||||||
|
|
||||||
# v26.09
|
|
||||||
|
|
||||||
* Bumped minimum Go version to 1.26.
|
|
||||||
* Updated libsignal to v0.102.2.
|
|
||||||
* Fixed handling messages with invalid values in formatting body ranges.
|
|
||||||
* Fixed websocket request retrying not working correctly if the first attempt
|
|
||||||
times out.
|
|
||||||
* Fixed another potential race condition with edited message bridging.
|
|
||||||
|
|
||||||
# v26.08
|
|
||||||
|
|
||||||
* Updated libsignal to v0.100.0
|
|
||||||
* Added support for handling own profile key changes.
|
|
||||||
* Changed attachment bridging behavior to match Signal Desktop.
|
|
||||||
* Fixed edited messages being bridged twice if certain race conditions occurred.
|
|
||||||
|
|
||||||
# v26.07
|
|
||||||
|
|
||||||
* Updated Docker image to Alpine 3.24.
|
|
||||||
* Updated libsignal to v0.97.2.
|
|
||||||
* Added automatic retry when sender key send fails due to missing session.
|
|
||||||
* Fixed changing poll votes from Matrix.
|
|
||||||
|
|
||||||
# v26.06
|
|
||||||
|
|
||||||
* Updated libsignal to v0.94.4.
|
|
||||||
* Updated mrenclave to fix looking up phone numbers.
|
|
||||||
* Changed knock accept handling to auto-join the ghost user afterwards.
|
|
||||||
|
|
||||||
# v26.05
|
|
||||||
|
|
||||||
* Updated libsignal to v0.93.2.
|
|
||||||
* Added support for importing sticker packs from Signal.
|
|
||||||
|
|
||||||
# v26.04
|
|
||||||
|
|
||||||
* Updated libsignal to v0.92.1.
|
|
||||||
* Added support for admin message deletes from Signal.
|
|
||||||
* Added support for binary service IDs in storage service.
|
|
||||||
* Fixed `private_chat_portal_meta` option not setting DM room names correctly.
|
|
||||||
* Fixed panic if user is logged out during initial chat sync.
|
|
||||||
* Fixed avatar upload failing when creating new Signal group.
|
|
||||||
|
|
||||||
# v26.03
|
|
||||||
|
|
||||||
* Switched to sending binary service ID fields in outgoing messages.
|
|
||||||
* Added support for roundtripping large attachments via disk to avoid keeping
|
|
||||||
the entire file in memory during en/decryption.
|
|
||||||
|
|
||||||
# v26.02.2
|
|
||||||
|
|
||||||
* Added support for more new binary service ID fields.
|
|
||||||
|
|
||||||
# v26.02.1
|
|
||||||
|
|
||||||
* Updated libsignal to v0.87.5.
|
|
||||||
* Added support for new binary service ID fields that Signal 8.0 switched to.
|
|
||||||
|
|
||||||
# v26.02
|
|
||||||
|
|
||||||
* Bumped minimum Go version to 1.25.
|
|
||||||
* Updated libsignal to v0.87.1.
|
|
||||||
* Added automatic recovery for the session not found error from libsignal.
|
|
||||||
* Fixed sender key state not being cleared on logout properly.
|
|
||||||
|
|
||||||
# v26.01
|
|
||||||
|
|
||||||
* Updated libsignal to v0.86.12.
|
|
||||||
* Changed automatic contact list sync option to only sync every 3 days rather
|
|
||||||
than on every restart.
|
|
||||||
* Fixed sending messages to groups with no other registered members.
|
|
||||||
* Fixed sender key sends failing if some users had changed devices.
|
|
||||||
* Fixed timestamps of outgoing typing notifications in DMs.
|
|
||||||
|
|
||||||
# v25.12
|
|
||||||
|
|
||||||
* Updated libsignal to v0.86.8.
|
|
||||||
* Updated Docker image to Alpine 3.23.
|
|
||||||
* Added support for dropping incoming DMs from blocked contacts on Signal.
|
|
||||||
* Added support for sender key encryption when sending to groups, which makes
|
|
||||||
sending much faster and enables sending typing notifications.
|
|
||||||
* Added support for encryption retry receipts.
|
|
||||||
* Fixed bugs with handling poll votes.
|
|
||||||
* Fixed history transfer option not showing up when pairing with Signal Android.
|
|
||||||
* Fixed nicknames being cleared not being bridged
|
|
||||||
(thanks to [@Enzime] in [#623]).
|
|
||||||
|
|
||||||
[#623]: https://github.com/mautrix/signal/pull/623
|
|
||||||
[@Enzime]: https://github.com/Enzime
|
|
||||||
|
|
||||||
# v25.11
|
|
||||||
|
|
||||||
* Updated libsignal to v0.86.4.
|
|
||||||
* Added support for bridging invite state in groups for phone number invites.
|
|
||||||
* Added support for polls.
|
|
||||||
* Fixed PNI signature not being sent when replying to message requests.
|
|
||||||
* Fixed unnecessary repeating error notices when Signal is down.
|
|
||||||
* Fixed sticker size metadata on Matrix not matching how native Signal Desktop
|
|
||||||
renders them.
|
|
||||||
|
|
||||||
# v25.10
|
|
||||||
|
|
||||||
* Switched to calendar versioning.
|
|
||||||
* Updated libsignal to v0.84.0.
|
|
||||||
* Fixed backfill creating incorrect disappearing timer change notices.
|
|
||||||
|
|
||||||
# v0.8.7 (2025-09-16)
|
|
||||||
|
|
||||||
* Removed legacy provisioning API and database legacy migration.
|
|
||||||
Upgrading directly from versions prior to v0.7.0 is not supported.
|
|
||||||
* If you've been using the bridge since before v0.7.0 and have prevented the
|
|
||||||
bridge from writing to the config, you must either update the config
|
|
||||||
manually or allow the bridge to update it for you **before** upgrading to
|
|
||||||
this release (i.e. run v0.8.6 once with config writing allowed).
|
|
||||||
* Updated libsignal to v0.80.3.
|
|
||||||
* Added support for `com.beeper.disappearing_timer` state event, which stores
|
|
||||||
the disappearing setting of chats and allows changing the setting from Matrix.
|
|
||||||
* Added support for nicknames in displayname templates.
|
|
||||||
* Like contact list names, nicknames are not safe to use on multi-user instances.
|
|
||||||
* Added support for creating Signal groups.
|
|
||||||
* Fixed certain types of logouts not being detected properly.
|
|
||||||
|
|
||||||
# v0.8.6 (2025-08-16)
|
|
||||||
|
|
||||||
* Deprecated legacy provisioning API. The `/_matrix/provision/v2` endpoints will
|
|
||||||
be deleted in the next release.
|
|
||||||
* Bumped minimum Go version to 1.24.
|
|
||||||
* Updated libsignal to v0.78.2.
|
|
||||||
* Added support for "delete to me" of chats and messages.
|
|
||||||
* Added support for latest Signal backup/transfer protocol.
|
|
||||||
|
|
||||||
# v0.8.5 (2025-07-16)
|
|
||||||
|
|
||||||
* Updated libsignal to v0.76.1.
|
|
||||||
|
|
||||||
# v0.8.4 (2025-06-16)
|
|
||||||
|
|
||||||
* Updated libsignal to v0.74.1.
|
|
||||||
* Updated Docker image to Alpine 3.22.
|
|
||||||
* Fixed avatars when using direct media.
|
|
||||||
* Fixed starting chats with non-contact users.
|
|
||||||
* Fixed Matrix media being rejected if the mime type isn't specified.
|
|
||||||
|
|
||||||
# v0.8.3 (2025-05-16)
|
|
||||||
|
|
||||||
* Updated libsignal to v0.72.1.
|
|
||||||
* Added initial support for direct media access.
|
|
||||||
* Note that media is only kept on the Signal servers for 45 days, after which
|
|
||||||
any direct media links will permanently stop working.
|
|
||||||
* Added buffer for decrypted events to prevent losing messages if the bridge is
|
|
||||||
stopped in the middle of event handling.
|
|
||||||
* Fixed backfilling messages in existing portals after relogining.
|
|
||||||
|
|
||||||
# v0.8.2 (2025-04-16)
|
|
||||||
|
|
||||||
* Updated libsignal to v0.70.0.
|
|
||||||
* Fixed panics in some cases when the bridge was under heavy load.
|
|
||||||
|
|
||||||
# v0.8.1 (2025-03-16)
|
|
||||||
|
|
||||||
* Added QR refreshing when logging in.
|
|
||||||
* Updated libsignal to v0.67.4.
|
|
||||||
|
|
||||||
# v0.8.0 (2025-02-16)
|
|
||||||
|
|
||||||
* Bumped minimum Go version to 1.23.
|
|
||||||
* Added support for history transfer.
|
|
||||||
* Updated libsignal to v0.66.2.
|
|
||||||
|
|
||||||
# v0.7.5 (2025-01-16)
|
|
||||||
|
|
||||||
* Added support for bridging mp4 gifs in both directions.
|
|
||||||
* Added support for signaling supported features to clients using the
|
|
||||||
`com.beeper.room_features` state event.
|
|
||||||
* Updated Signal websocket authentication method.
|
|
||||||
* Fixed some cases where websocket would get stuck after a ping timeout.
|
|
||||||
|
|
||||||
# v0.7.4 (2024-12-16)
|
|
||||||
|
|
||||||
* Fixed syncing server-side storage after Signal login.
|
|
||||||
* Added support for new SSRE2 method of receiving the server-side storage key.
|
|
||||||
* Updated libsignal to v0.64.1.
|
|
||||||
* Updated Docker image to Alpine 3.21.
|
|
||||||
|
|
||||||
# v0.7.3 (2024-11-16)
|
|
||||||
|
|
||||||
* Updated libsignal to v0.62.0.
|
|
||||||
* Note for bridges running in systemd: the new version of libsignal may be
|
|
||||||
incompatible with the `MemoryDenyWriteExecute=true` option (see [#750]).
|
|
||||||
* Added basic support for Signal's new file upload protocol.
|
|
||||||
|
|
||||||
[#750]: https://github.com/mautrix/signal/issues/570
|
|
||||||
|
|
||||||
# v0.7.2 (2024-10-16)
|
|
||||||
|
|
||||||
* Updated to libsignal v0.58.3.
|
|
||||||
* Fixed spurious decryption error notices for Signal messages when the
|
|
||||||
websocket reconnects and receives old already-bridged messages.
|
|
||||||
* Fixed signalmeow not respecting account settings for choosing sender
|
|
||||||
certificate.
|
|
||||||
* Fixed bugs in storage service decryption, which could cause issues with
|
|
||||||
missing contact names among other things.
|
|
||||||
* Fixed call start notices only working once per direct chat.
|
|
||||||
|
|
||||||
# v0.7.1 (2024-09-16)
|
|
||||||
|
|
||||||
* Updated to libsignal v0.57.1.
|
|
||||||
* Dropped support for unauthenticated media on Matrix.
|
|
||||||
* Added support for Matrix->Signal power level bridging
|
|
||||||
(thanks to [@maltee1] in [#531]).
|
|
||||||
* Changed voice message conversion to convert to aac instead of m4a,
|
|
||||||
because Signal iOS doesn't appear to like ffmpeg's m4a files.
|
|
||||||
* Fixed outgoing sync messages not including disappearing start timestamp,
|
|
||||||
which would cause native clients to disappear messages at the wrong time.
|
|
||||||
* Re-added notices about decryption errors.
|
|
||||||
|
|
||||||
[#531]: https://github.com/mautrix/signal/pull/531
|
|
||||||
|
|
||||||
# v0.7.0 (2024-08-16)
|
|
||||||
|
|
||||||
* Bumped minimum Go version to 1.22.
|
|
||||||
* Updated to libsignal v0.55.0.
|
|
||||||
* Rewrote bridge using bridgev2 architecture.
|
|
||||||
* It is recommended to check the config file after upgrading. If you have
|
|
||||||
prevented the bridge from writing to the config, you should update it
|
|
||||||
manually.
|
|
||||||
* Thanks to [@maltee1] for reimplementing Matrix -> Signal membership
|
|
||||||
handling in the rewrite.
|
|
||||||
* If you are still somehow using a pre-v0.5.0 versions, upgrading to v0.6.3
|
|
||||||
is required before upgrading to v0.7.0 or higher.
|
|
||||||
|
|
||||||
# v0.6.3 (2024-07-16)
|
|
||||||
|
|
||||||
* Updated to libsignal v0.52.0.
|
|
||||||
* Fixed bridge losing track of user phone numbers in some cases.
|
|
||||||
* Fixed edge cases in handling new outgoing DMs started from other devices.
|
|
||||||
* Added `sync groups` command (thanks to [@maltee1] in [#490]).
|
|
||||||
* Fixed typo in location bridging example config
|
|
||||||
(thanks to [@AndrewFerr] in [#516]).
|
|
||||||
|
|
||||||
[#490]: https://github.com/mautrix/signal/pull/490
|
|
||||||
[#516]: https://github.com/mautrix/signal/pull/516
|
|
||||||
[@AndrewFerr]: https://github.com/mautrix/signal/pull/516
|
|
||||||
|
|
||||||
# v0.6.2 (2024-06-16)
|
|
||||||
|
|
||||||
* Updated to libsignal v0.51.0.
|
|
||||||
* Fixed voice messages not being rendered correctly in Element X.
|
|
||||||
* Fixed contact avatars not being bridged correctly even when enabled in
|
|
||||||
the bridge config.
|
|
||||||
* Implemented connector for the upcoming bridgev2 architecture.
|
|
||||||
|
|
||||||
# v0.6.1 (2024-05-16)
|
|
||||||
|
|
||||||
* Added support for bridging location messages from Matrix to Signal
|
|
||||||
(thanks to [@maltee1] in [#504]).
|
|
||||||
* Note that Signal doesn't support real location messages, so they're just
|
|
||||||
bridged as links. The link template is configurable.
|
|
||||||
* Fixed bridging long text messages from Signal
|
|
||||||
(thanks to [@maltee1] in [#506]).
|
|
||||||
* Improved handling of ping timeouts in Signal websocket.
|
|
||||||
|
|
||||||
[#504]: https://github.com/mautrix/signal/pull/504
|
|
||||||
[#506]: https://github.com/mautrix/signal/pull/506
|
|
||||||
|
|
||||||
# v0.6.0 (2024-04-16)
|
|
||||||
|
|
||||||
* Updated to libsignal v0.44.0.
|
|
||||||
* Refactored bridge to support Signal's new phone number identifier (PNI)
|
|
||||||
system in order to fix starting new chats and receiving messages from new
|
|
||||||
users.
|
|
||||||
* When starting a chat with a user you haven't talked to before, the portal
|
|
||||||
room will not have a ghost user for the recipient until they accept the
|
|
||||||
message request.
|
|
||||||
* Added support for syncing existing groups on login instead of having to wait
|
|
||||||
for new messages.
|
|
||||||
* Added notices if decrypting incoming message from Signal fails.
|
|
||||||
* Added bridging of group metadata from Matrix to Signal
|
|
||||||
(thanks to [@maltee1] in [#461]).
|
|
||||||
* Added command to create new Signal group for Matrix room
|
|
||||||
(thanks to [@maltee1] in [#461] and [#491]).
|
|
||||||
* Added commands for inviting users to Signal groups by phone number
|
|
||||||
(thanks to [@maltee1] in [#495]).
|
|
||||||
* Improved handling of missed Signal group metadata changes
|
|
||||||
(thanks to [@maltee1] in [#488]).
|
|
||||||
|
|
||||||
[#461]: https://github.com/mautrix/signal/pull/461
|
|
||||||
[#488]: https://github.com/mautrix/signal/pull/488
|
|
||||||
[#491]: https://github.com/mautrix/signal/pull/491
|
|
||||||
[#495]: https://github.com/mautrix/signal/pull/495
|
|
||||||
|
|
||||||
# v0.5.1 (2024-03-16)
|
|
||||||
|
|
||||||
* Updated to libsignal v0.41.0.
|
|
||||||
* Fixed sending messages to groups.
|
|
||||||
* Fixed some cases of ghost user info changing repeatedly on multi-user
|
|
||||||
instances.
|
|
||||||
* Fixed migrating SQLite databases from Python version.
|
|
||||||
|
|
||||||
# v0.5.0 (2024-02-16)
|
|
||||||
|
|
||||||
* Rewrote bridge in Go.
|
* Rewrote bridge in Go.
|
||||||
* To migrate the bridge, simply upgrade in-place. The database and config
|
* The bridge doesn't use signald anymore.
|
||||||
will be migrated automatically, although some parts of the config aren't
|
* All users will have to re-link the bridge.
|
||||||
migrated (e.g. log config). If you prevented the bridge from writing to
|
* Primary device mode is no longer supported.
|
||||||
the config file, you'll have to temporarily allow it or update it yourself.
|
|
||||||
* The bridge doesn't use signald anymore, all users will have to re-link the
|
|
||||||
bridge. signald can be deleted after upgrading.
|
|
||||||
* Primary device mode is no longer supported, signal-cli is recommended if
|
|
||||||
you don't want to use the official Signal mobile apps.
|
|
||||||
* Some old features are not yet supported (e.g. group management features).
|
|
||||||
* Renamed main branch from `master` to `main`.
|
* Renamed main branch from `master` to `main`.
|
||||||
* Added support for edits and message formatting.
|
|
||||||
|
|
||||||
# v0.4.3 (2023-05-17)
|
# v0.4.3 (2023-05-17)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
See <https://docs.mau.fi/bridges/general/contributing.html>
|
|
||||||
28
Dockerfile
28
Dockerfile
|
|
@ -1,17 +1,17 @@
|
||||||
# -- Build libsignal (with Rust) --
|
# -- Build libsignal (with Rust) --
|
||||||
FROM rust:1-alpine AS rust-builder
|
FROM rust:1-alpine as rust-builder
|
||||||
RUN apk add --no-cache git make cmake protoc musl-dev g++ clang-dev protobuf-dev
|
RUN apk add --no-cache git make cmake protoc musl-dev g++ clang-dev
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
# Copy all files needed for Rust build, and no Go files
|
# Copy all files needed for Rust build, and no Go files
|
||||||
COPY pkg/libsignalgo/libsignal/. pkg/libsignalgo/libsignal/.
|
COPY pkg/libsignalgo/libsignal/. pkg/libsignalgo/libsignal/.
|
||||||
COPY build-rust.sh .
|
|
||||||
|
|
||||||
RUN ./build-rust.sh
|
ENV RUSTFLAGS="-Ctarget-feature=-crt-static" RUSTC_WRAPPER=""
|
||||||
|
RUN cd pkg/libsignalgo/libsignal/ && cargo build -p libsignal-ffi --release
|
||||||
|
|
||||||
# -- Build mautrix-signal (with Go) --
|
# -- Build mautrix-signal (with Go) --
|
||||||
FROM golang:1-alpine3.24 AS go-builder
|
FROM golang:1-alpine3.19 AS go-builder
|
||||||
RUN apk add --no-cache git ca-certificates build-base olm-dev zlib-dev
|
RUN apk add --no-cache git ca-certificates build-base olm-dev
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
# Copy all files needed for Go build, and no Rust files
|
# Copy all files needed for Go build, and no Rust files
|
||||||
|
|
@ -19,27 +19,25 @@ COPY *.go go.* *.yaml *.sh ./
|
||||||
COPY pkg/signalmeow/. pkg/signalmeow/.
|
COPY pkg/signalmeow/. pkg/signalmeow/.
|
||||||
COPY pkg/libsignalgo/* pkg/libsignalgo/
|
COPY pkg/libsignalgo/* pkg/libsignalgo/
|
||||||
COPY pkg/libsignalgo/resources/. pkg/libsignalgo/resources/.
|
COPY pkg/libsignalgo/resources/. pkg/libsignalgo/resources/.
|
||||||
COPY pkg/msgconv/. pkg/msgconv/.
|
COPY config/. config/.
|
||||||
COPY pkg/signalid/. pkg/signalid/.
|
COPY database/. database/.
|
||||||
COPY pkg/connector/. pkg/connector/.
|
COPY msgconv/. msgconv/.
|
||||||
COPY cmd/. cmd/.
|
|
||||||
COPY .git .git
|
COPY .git .git
|
||||||
|
|
||||||
ENV LIBRARY_PATH=.
|
ENV LIBRARY_PATH=.
|
||||||
COPY --from=rust-builder /build/pkg/libsignalgo/libsignal/target/*/libsignal_ffi.a ./
|
COPY --from=rust-builder /build/pkg/libsignalgo/libsignal/target/release/libsignal_ffi.a /build/libsignal_ffi.a
|
||||||
RUN <<EOF
|
|
||||||
EOF
|
|
||||||
RUN ./build-go.sh
|
RUN ./build-go.sh
|
||||||
|
|
||||||
# -- Run mautrix-signal --
|
# -- Run mautrix-signal --
|
||||||
FROM alpine:3.24
|
FROM alpine:3.19
|
||||||
|
|
||||||
ENV UID=1337 \
|
ENV UID=1337 \
|
||||||
GID=1337
|
GID=1337
|
||||||
|
|
||||||
RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq-go olm
|
RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq olm
|
||||||
|
|
||||||
COPY --from=go-builder /build/mautrix-signal /usr/bin/mautrix-signal
|
COPY --from=go-builder /build/mautrix-signal /usr/bin/mautrix-signal
|
||||||
|
COPY --from=go-builder /build/example-config.yaml /opt/mautrix-signal/example-config.yaml
|
||||||
COPY --from=go-builder /build/docker-run.sh /docker-run.sh
|
COPY --from=go-builder /build/docker-run.sh /docker-run.sh
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,14 @@
|
||||||
ARG DOCKER_HUB="docker.io"
|
FROM alpine:3.19
|
||||||
|
|
||||||
FROM ${DOCKER_HUB}/alpine:3.24
|
|
||||||
|
|
||||||
ENV UID=1337 \
|
ENV UID=1337 \
|
||||||
GID=1337
|
GID=1337
|
||||||
|
|
||||||
RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq-go
|
RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq
|
||||||
|
|
||||||
ARG EXECUTABLE=./mautrix-signal
|
ARG EXECUTABLE=./mautrix-signal
|
||||||
COPY $EXECUTABLE /usr/bin/mautrix-signal
|
COPY $EXECUTABLE /usr/bin/mautrix-signal
|
||||||
|
COPY ./example-config.yaml /opt/mautrix-signal/example-config.yaml
|
||||||
COPY ./docker-run.sh /docker-run.sh
|
COPY ./docker-run.sh /docker-run.sh
|
||||||
ENV BRIDGEV2=1
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
WORKDIR /data
|
|
||||||
|
|
||||||
CMD ["/docker-run.sh"]
|
CMD ["/docker-run.sh"]
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
The mautrix-signal developers grant the following special exceptions:
|
|
||||||
|
|
||||||
* to Beeper the right to embed the program in the Beeper clients and servers,
|
|
||||||
and use and distribute the collective work without applying the license to
|
|
||||||
the whole.
|
|
||||||
* to Element the right to distribute compiled binaries of the program as a part
|
|
||||||
of the Element Server Suite and other server bundles without applying the
|
|
||||||
license.
|
|
||||||
|
|
||||||
All exceptions are only valid under the condition that any modifications to
|
|
||||||
the source code of mautrix-signal (including signalmeow and libsignalgo) remain
|
|
||||||
publicly available under the terms of the GNU AGPL version 3 or later.
|
|
||||||
|
|
||||||
Note: mautrix-signal depends on libsignal, which is also licensed under the AGPL.
|
|
||||||
A license exception for libsignal must be acquired separately from Signal.
|
|
||||||
32
Makefile
Normal file
32
Makefile
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
.PHONY: all build_rust copy_library build_go clean
|
||||||
|
|
||||||
|
all: build_rust copy_library build_go
|
||||||
|
|
||||||
|
LIBRARY_NAME=libsignal-ffi
|
||||||
|
LIBRARY_FILENAME=libsignal_ffi.a
|
||||||
|
RUST_DIR=pkg/libsignalgo/libsignal
|
||||||
|
GO_BINARY=mautrix-signal
|
||||||
|
|
||||||
|
ifneq ($(DBG),1)
|
||||||
|
RUST_PROFILE=release
|
||||||
|
RUST_TARGET_SUBDIR=release
|
||||||
|
GO_GCFLAGS=
|
||||||
|
else
|
||||||
|
RUST_PROFILE=dev
|
||||||
|
RUST_TARGET_SUBDIR=debug
|
||||||
|
GO_GCFLAGS=all=-N -l
|
||||||
|
endif
|
||||||
|
|
||||||
|
build_rust:
|
||||||
|
cd $(RUST_DIR) && cargo build -p $(LIBRARY_NAME) --profile=$(RUST_PROFILE)
|
||||||
|
|
||||||
|
copy_library:
|
||||||
|
cp $(RUST_DIR)/target/$(RUST_TARGET_SUBDIR)/$(LIBRARY_FILENAME) .
|
||||||
|
|
||||||
|
build_go:
|
||||||
|
LIBRARY_PATH="$${LIBRARY_PATH}:." go build -gcflags "$(GO_GCFLAGS)" -ldflags "-X main.Tag=$$(git describe --exact-match --tags 2>/dev/null) -X main.Commit=$$(git rev-parse HEAD) -X 'main.BuildTime=`date '+%b %_d %Y, %H:%M:%S'`'"
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f ./$(LIBRARY_FILENAME)
|
||||||
|
cd $(RUST_DIR) && cargo clean
|
||||||
|
rm -f $(GO_BINARY)
|
||||||
|
|
@ -15,7 +15,8 @@ Some quick links:
|
||||||
* Basic usage: [Authentication](https://docs.mau.fi/bridges/go/signal/authentication.html)
|
* Basic usage: [Authentication](https://docs.mau.fi/bridges/go/signal/authentication.html)
|
||||||
|
|
||||||
### Features & Roadmap
|
### Features & Roadmap
|
||||||
[ROADMAP.md](ROADMAP.md) contains a general overview of what is supported by the bridge.
|
[ROADMAP.md](https://github.com/mautrix/signal/blob/main/ROADMAP.md)
|
||||||
|
contains a general overview of what is supported by the bridge.
|
||||||
|
|
||||||
## Discussion
|
## Discussion
|
||||||
Matrix room: [`#signal:maunium.net`](https://matrix.to/#/#signal:maunium.net)
|
Matrix room: [`#signal:maunium.net`](https://matrix.to/#/#signal:maunium.net)
|
||||||
|
|
|
||||||
45
ROADMAP.md
45
ROADMAP.md
|
|
@ -1,48 +1,45 @@
|
||||||
# Features & roadmap
|
# Features & roadmap
|
||||||
|
|
||||||
* Matrix → Signal
|
* Matrix → Signal
|
||||||
* [x] Message content
|
* [ ] Message content
|
||||||
* [x] Text
|
* [x] Text
|
||||||
* [x] Formatting
|
* [x] Formatting
|
||||||
* [x] Mentions
|
* [x] Mentions
|
||||||
* [x] Polls
|
* [ ] Media
|
||||||
* [x] Media
|
|
||||||
* [x] Images
|
* [x] Images
|
||||||
* [x] Audio files
|
* [x] Audio files
|
||||||
* [x] Voice messages
|
* [x] Voice messages
|
||||||
* [x] Files
|
* [x] Files
|
||||||
* [x] Gifs
|
* [x] Gifs
|
||||||
* [x] Locations
|
* [ ] Locations
|
||||||
* [x] Stickers
|
* [x] Stickers
|
||||||
* [x] Message edits
|
* [x] Message edits
|
||||||
* [x] Message reactions
|
* [x] Message reactions
|
||||||
* [x] Message redactions
|
* [x] Message redactions
|
||||||
* [x] Group info changes
|
* [ ] Group info changes
|
||||||
* [x] Name
|
* [ ] Name
|
||||||
* [x] Avatar
|
* [ ] Avatar
|
||||||
* [x] Topic
|
* [ ] Topic
|
||||||
* [ ] Membership actions
|
* [ ] Membership actions
|
||||||
* [ ] Join (accepting invites)
|
* [ ] Join (accepting invites)
|
||||||
* [x] Invite
|
* [ ] Invite
|
||||||
* [x] Leave
|
* [ ] Leave
|
||||||
* [x] Kick/Ban/Unban
|
* [ ] Kick/Ban/Unban
|
||||||
* [x] Group permissions
|
|
||||||
* [x] Typing notifications
|
* [x] Typing notifications
|
||||||
* [x] Read receipts
|
* [ ] Read receipts (currently partial support, only marks last message)
|
||||||
* [x] Delivery receipts (sent after message is bridged)
|
* [x] Delivery receipts (sent after message is bridged)
|
||||||
* Signal → Matrix
|
* Signal → Matrix
|
||||||
* [ ] Message content
|
* [ ] Message content
|
||||||
* [x] Text
|
* [x] Text
|
||||||
* [x] Formatting
|
* [x] Formatting
|
||||||
* [x] Mentions
|
* [x] Mentions
|
||||||
* [x] Polls
|
|
||||||
* [ ] Media
|
* [ ] Media
|
||||||
* [x] Images
|
* [x] Images
|
||||||
* [x] Voice notes
|
* [x] Voice notes
|
||||||
* [x] Files
|
* [x] Files
|
||||||
* [x] Gifs
|
* [x] Gifs
|
||||||
* [x] Stickers
|
* [x] Stickers
|
||||||
* [x] Contacts
|
* [ ] Contacts
|
||||||
* [ ] Payment messages
|
* [ ] Payment messages
|
||||||
* [x] Message edits
|
* [x] Message edits
|
||||||
* [x] Message reactions
|
* [x] Message reactions
|
||||||
|
|
@ -55,20 +52,20 @@
|
||||||
* [x] Name
|
* [x] Name
|
||||||
* [x] Avatar
|
* [x] Avatar
|
||||||
* [x] Topic
|
* [x] Topic
|
||||||
* [x] Membership actions
|
* [ ] Membership actions
|
||||||
* [x] Join
|
* [ ] Join
|
||||||
* [x] Invite
|
* [ ] Invite
|
||||||
* [x] Request join (via invite link, requires a client that supports knocks)
|
* [ ] Request join (via invite link, requires a client that supports knocks)
|
||||||
* [x] Leave
|
* [ ] Leave
|
||||||
* [x] Kick/Ban/Unban
|
* [ ] Kick/Ban/Unban
|
||||||
* [x] Group permissions
|
* [ ] Group permissions
|
||||||
* [x] Typing notifications
|
* [x] Typing notifications
|
||||||
* [x] Read receipts
|
* [x] Read receipts
|
||||||
* [ ] Delivery receipts (there's no good way to bridge these)
|
* [ ] Delivery receipts (there's no good way to bridge these)
|
||||||
* [x] Disappearing messages
|
* [x] Disappearing messages
|
||||||
* Misc
|
* Misc
|
||||||
* [x] Automatic portal creation
|
* [ ] Automatic portal creation
|
||||||
* [x] After login
|
* [ ] After login
|
||||||
* [x] When receiving message
|
* [x] When receiving message
|
||||||
* [x] Linking as secondary device
|
* [x] Linking as secondary device
|
||||||
* [ ] Registering as primary device
|
* [ ] Registering as primary device
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
BINARY_NAME=mautrix-signal go tool maubuild "$@"
|
export MAUTRIX_VERSION=$(cat go.mod | grep 'maunium.net/go/mautrix ' | awk '{ print $2 }')
|
||||||
|
export GO_LDFLAGS="-s -w -X main.Tag=$(git describe --exact-match --tags 2>/dev/null) -X main.Commit=$(git rev-parse HEAD) -X 'main.BuildTime=`date '+%b %_d %Y, %H:%M:%S'`' -X 'maunium.net/go/mautrix.GoModVersion=$MAUTRIX_VERSION'"
|
||||||
|
go build -ldflags "$GO_LDFLAGS" -o mautrix-signal
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
git submodule update --init
|
|
||||||
cd pkg/libsignalgo/libsignal && RUSTFLAGS="-Ctarget-feature=-crt-static" RUSTC_WRAPPER="" cargo build -p libsignal-ffi --profile=release
|
|
||||||
7
build.sh
7
build.sh
|
|
@ -1,5 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
git submodule init
|
||||||
./build-rust.sh
|
git submodule update
|
||||||
cp -f pkg/libsignalgo/libsignal/target/release/libsignal_ffi.a .
|
make
|
||||||
LIBRARY_PATH=.:$LIBRARY_PATH ./build-go.sh
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue