This is the last part of unix socket support to talk to app servers, go
based app services already support unix sockets:
5a68173fe3
```
appservice:
# The address that the homeserver can use to connect to this appservice.
address: unix:///var/snap/matrix/current/whatsapp.socket
# The hostname and port where this appservice should listen.
hostname: /var/snap/matrix/current/whatsapp.socket
port: 0
```
### Pull Request Checklist
<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->
* [x] I have added Go unit tests or [Complement integration
tests](https://github.com/matrix-org/complement) for this PR _or_ I have
justified why this PR doesn't need tests
* [x] Pull request includes a [sign off below using a legally
identifiable
name](https://matrix-org.github.io/dendrite/development/contributing#sign-off)
_or_ I have already signed off privately
Signed-off-by: `Boris Rybalkin <ribalkin@gmail.com>`
This adds store & forward relays into dendrite for p2p.
A few things have changed:
- new relay api serves new http endpoints for s&f federation
- updated outbound federation queueing which will attempt to forward
using s&f if appropriate
- database entries to track s&f relays for other nodes
* Setup CD on GCP
* Squashed commit of the following:
commit 7823481a0e
Author: PiotrKozimor <37144818+PiotrKozimor@users.noreply.github.com>
Date: Mon Jul 4 17:39:22 2022 +0200
Merge v0.8.9 (#13)
Squashed commit of the following:
commit b5c55faf98
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Fri Jul 1 12:00:32 2022 +0100
Version 0.8.9 (#2549)
* Version 0.8.9
* Update changelog
commit b50a24c666
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Fri Jul 1 10:54:07 2022 +0100
Roomserver producers package (#2546)
* Give the roomserver a producers package
* Change init point
* Populate ACLs API
* Fix build issues
* `RoomEventProducer` naming
commit 89cd0e8fc1
Author: Till <2353100+S7evinK@users.noreply.github.com>
Date: Fri Jul 1 11:49:26 2022 +0200
Try to fix backfilling (#2548)
* Try to fix backfilling
* Return start/end to not confuse clients
* Update GMSL
* Update GMSL
commit 086f182e24
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Fri Jul 1 09:50:06 2022 +0100
Disable WebAssembly builds for now
commit 54bed4c593
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Fri Jul 1 09:37:54 2022 +0100
Blacklist `Guest users can join guest_access rooms` test until it can be investigated
commit 561c159ad7
Author: Till <2353100+S7evinK@users.noreply.github.com>
Date: Thu Jun 30 12:34:37 2022 +0200
Silence presence logs (#2547)
commit 519bc1124b
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Wed Jun 29 15:29:39 2022 +0100
Add `evacuateUser` endpoint, use it when deactivating accounts (#2545)
* Add `evacuateUser` endpoint, use it when deactivating accounts
* Populate the API
* Clean up user devices when deactivating
* Include invites, delete pushers
commit 2dea466685
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Wed Jun 29 12:32:24 2022 +0100
Return an error if trying to invite a malformed user ID (#2543)
commit 2086992caf
Author: Till <2353100+S7evinK@users.noreply.github.com>
Date: Wed Jun 29 10:49:12 2022 +0200
Don't return `end` if there are not more messages (#2542)
* Be more spec compliant
* Move lazyLoadMembers to own method
commit 920a20821b
Author: Jean Lucas <jean@4ray.co>
Date: Mon Jun 27 04:15:19 2022 -0400
Fix nats.go commit (#2540)
Signed-off-by: Jean Lucas <jean@4ray.co>
commit 7120eb6bc9
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Wed Jun 15 14:27:07 2022 +0100
Add `InputDeviceListUpdate` to the keyserver, remove old input API (#2536)
* Add `InputDeviceListUpdate` to the keyserver, remove old input API
* Fix copyright
* Log more information when a device list update fails
commit 1b90cc9536
Author: Till <2353100+S7evinK@users.noreply.github.com>
Date: Wed Jun 15 12:50:02 2022 +0200
Fix rare panic when returning user devices over federation (#2534)
commit 4c2a10f1a6
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Mon Jun 13 15:11:10 2022 +0100
Handle state before, send history visibility in output (#2532)
* Check state before event
* Tweaks
* Refactor a bit, include in output events
* Don't waste time if soft failed either
* Tweak control flow, comments, use GMSL history visibility type
commit c500958583
Author: Emanuele Aliberti <dev@mtka.eu>
Date: Mon Jun 13 13:08:46 2022 +0200
generic CaddyFile in front of Dendrite (monolith) (#2531)
for Caddy 2.5.x
Co-authored-by: emanuele.aliberti <emanuele.aliberti@mtka.eu>
commit e1136f4d3e
Author: Till Faelligen <davidf@element.io>
Date: Mon Jun 13 11:46:59 2022 +0200
Make the linter happy again
commit 0a7f7dc716
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Mon Jun 13 10:16:30 2022 +0100
Add `--difference` to `resolve-state` tool
commit 89d2adadbd
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Fri Jun 10 10:58:04 2022 +0100
Attempt to raise the file descriptor limit at startup (#2527)
commit 1030072285
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Fri Jun 10 10:18:32 2022 +0100
Rename the page to "Optimise your installation"
commit 16ed1633b6
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Fri Jun 10 10:15:14 2022 +0100
Highlighting in docs
commit e2a64773ce
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date: Fri Jun 10 10:14:15 2022 +0100
Add new next steps page to the documentation
commit 660f7839f5
Author: Till <2353100+S7evinK@users.noreply.github.com>
Date: Thu Jun 9 18:38:07 2022 +0200
Correctly redact events over federation (#2526)
* Ensure we check powerlevel/origin before redacting an event
* Add passing test
* Use pl.UserLevel
* Make check more readable, also check for the sender
* Refactor ApplicationServiceWorkerState to be more robust
* Add launch.json to VS Code
* Implement login with JWT, registering with email, failed login rate limiting and reset password with m.login.email.identity auth type
* Log errors when JWT parsing failed
* Development build script
* Fix linter errors
* Use golangci-lint as a linter in VS Code
* Fix tests with RtFailedLogin
* Pass config load tests - parse JWT public key only if enabled
* Reduce CI steps
Do not support 386 arch and go 1.16, 1.17
* Fix linter errors
* Change RtFailedLogin logic - nil pointer can be provided
* Respect access token in query
* Fix typos
* Use only one mutex in RtFailedLogin
* Remove eventsRemaining across appservice component
* Push dendrite to production registry as well
* Rafactor TestRtFailedLogin
* Add Pushserver component with Pushers API
Co-authored-by: Tommie Gannert <tommie@gannert.se>
Co-authored-by: Dan Peleg <dan@globekeeper.com>
* Wire Pushserver component
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
* Add PushGatewayClient.
The full event format is required for Sytest.
* Add a pushrules module.
* Change user API account creation to use the new pushrules module's defaults.
Introduces "scope" as required by client API, and some small field
tweaks to make some 61push Sytests pass.
* Add push rules query/put API in Pushserver.
This manipulates account data over User API, and fires sync messages
for changes. Those sync messages should, according to an existing TODO
in clientapi, be moved to userapi.
Forks clientapi/producers/syncapi.go to pushserver/ for later extension.
* Add clientapi routes for push rules to Pushserver.
A cleanup would be to move more of the name-splitting logic into
pushrules.go, to depollute routing.go.
* Output rooms.join.unread_notifications in /sync.
This is the read-side. Pushserver will be the write-side.
* Implement pushserver/storage for notifications.
* Use PushGatewayClient and the pushrules module in Pushserver's room consumer.
* Use one goroutine per user to avoid locking up the entire server for
one bad push gateway.
* Split pushing by format.
* Send one device per push. Sytest does not support coalescing
multiple devices into one push. Matches Synapse. Either we change
Sytest, or remove the group-by-url-and-format logic.
* Write OutputNotificationData from push server. Sync API is already
the consumer.
* Implement read receipt consumers in Pushserver.
Supports m.read and m.fully_read receipts.
* Add clientapi route for /unstable/notifications.
* Rename to UpsertPusher for clarity and handle pusher update
* Fix linter errors
* Ignore body.Close() error check
* Fix push server internal http wiring
* Add 40 newly passing 61push tests to whitelist
* Add next 12 newly passing 61push tests to whitelist
* Send notification data before notifying users in EDU server consumer
* NATS JetStream
* Goodbye sarama
* Fix `NewStreamTokenFromString`
* Consume on the correct topic for the roomserver
* Don't panic, NAK instead
* Move push notifications into the User API
* Don't set null values since that apparently causes Element upsetti
* Also set omitempty on conditions
* Fix bug so that we don't override the push rules unnecessarily
* Tweak defaults
* Update defaults
* More tweaks
* Move `/notifications` onto `r0`/`v3` mux
* User API will consume events and read/fully read markers from the sync API with stream positions, instead of consuming directly
Co-authored-by: Piotr Kozimor <p1996k@gmail.com>
Co-authored-by: Tommie Gannert <tommie@gannert.se>
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
* Only include go-sqlite3 on the relevant binaries
* The driver name is always sqlite3 now
* Update to matrix-org/go-sqlite3-js@e537baa
* Add initial Wasm test harness
* Upgrade go-sqlite3-js
This fixes an error about semicolons in single statements.
* Add browser-like WebSocket API for testing
* Upgrade go-sqlite3-js
This upgrade includes printing panic messages next to stacks.
* Run for all PRs targeting any branch
* Use manual Node caching
* Temporarily run for all pushes
* Use npm ci instead of install
* Use HTTPS auth for repo packages
* Match path style from build.sh
* update utp
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
* A kafkaesque room event consumer for the roomserver.
Implement the main input loop for the roomserver.
It will receive events from a kafkaesque event source and track
where it is in the stream.
It currently does nothing with the events it consumes.