Commit graph

2530 commits

Author SHA1 Message Date
Neil Alexander 7d097325a3
Fix server notices user 2022-11-08 10:44:58 +00:00
Neil Alexander 786f008607
Try that again 2022-11-08 10:27:01 +00:00
Neil Alexander 196839ebf4
Fix wrong server name reference 2022-11-08 09:24:08 +00:00
Neil Alexander a32982cb7f
Fix some more things 2022-11-07 16:52:28 +00:00
Neil Alexander a46bf9878b
Fix some bugs 2022-11-07 16:06:37 +00:00
Neil Alexander be2f90f0b8
OpenID 2022-11-07 16:01:12 +00:00
Neil Alexander 62dd0afc0b
Three PID 2022-11-07 15:29:51 +00:00
Neil Alexander e36decf025
Fix another bug 2022-11-07 15:11:46 +00:00
Neil Alexander 1176b6892e
Fix bugs 2022-11-07 15:06:40 +00:00
Neil Alexander 4998e0757d
Notifications 2022-11-07 15:02:42 +00:00
Neil Alexander 6ea580d9c9
Fix some bugs 2022-11-07 14:15:43 +00:00
Neil Alexander c72c58dab9
Pushers 2022-11-07 13:22:35 +00:00
Neil Alexander 76ac6dbdf1
Profiles tables 2022-11-07 13:04:55 +00:00
Neil Alexander 2e74be1bf2
Clean up some logging 2022-11-07 12:07:30 +00:00
Neil Alexander 03fc5fd0ea
what is going on 2022-11-07 11:11:18 +00:00
Neil Alexander 3b816f306e
Migration tweaks 2022-11-07 10:22:13 +00:00
Neil Alexander d058e052fc
Devices table 2022-11-07 09:30:26 +00:00
Neil Alexander b01510c49a
Merge branch 'main' into neilalexander/vhostinguserapi 2022-11-07 09:11:28 +00:00
Till c125203eb6
Handle m.room.tombstone events in the UserAPI (#2864)
Fixes #2863 and makes 
```
/upgrade preserves direct room state
local user has tags copied to the new room
remote user has tags copied to the new room
```
pass.
2022-11-07 09:47:18 +01:00
Neil Alexander a7b74176e3
Revert Docker user change 2022-11-04 21:49:18 +00:00
Till Faelligen b2712cd2b1
Fix GHA release script 2022-11-04 20:58:24 +01:00
Neil Alexander 7c73b131f4
Version 0.10.7 (#2861)
Changelog and version bump.
2022-11-04 15:33:20 +00:00
Neil Alexander da7f2a7047
More stuff 2022-11-04 15:11:28 +00:00
Till efe28db631
Update latestPosition when getting reversed room delta (#2860)
Regression test added in
https://github.com/matrix-org/complement/pull/551
Should fix https://github.com/matrix-org/dendrite/issues/2514?
2022-11-04 15:39:09 +01:00
Neil Alexander a0cc4c806c
Account tables 2022-11-04 12:56:33 +00:00
Till b13cb43785
Send presence to joined hosts only (#2858)
Send presence events only to rooms the user is participating, not all
servers we know about.
Should fix #2752
2022-11-04 13:23:00 +01:00
Neil Alexander d1c61f5f95
Account data 2022-11-04 12:09:49 +00:00
Neil Alexander 7fd2c10975
Add server_name columns 2022-11-04 11:09:43 +00:00
Till Faelligen eeabe892a9
Cache go mod directory 2022-11-04 11:54:53 +01:00
Neil Alexander 98d3f88bfb
Move prev_batch calculation (#2856)
This might help #2847.
2022-11-03 16:56:21 +00:00
Neil Alexander fb2e7d1b05
Put P2P Demos back into their own Dockerfiles 2022-11-03 13:57:44 +00:00
Neil Alexander 9625a79926
Update to matrix-org/pinecone@37f2e9b 2022-11-03 13:06:21 +00:00
gitlab-nickfreeman 23a25be904
Update README.md (#2855)
There only are 2, not 3 sample `docker-compose` files.
This is only a change to the README.md, no need for Go unit tests

### 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: `Nick Freeman <nick@nickfreeman.de>`
2022-11-03 12:18:25 +00:00
Neil Alexander 8704e84898
Tweak removeDuplicates calls to use events instead of recentEvents (#2853)
... since `events` is *after* history visibility filtering, not before
it.
2022-11-03 10:19:37 +00:00
0x1a8510f2 1fcbb9b5e5
Fix workdir in Dockerfile (and make it a volume) (#2852) 2022-11-03 08:37:58 +00:00
Till Faelligen 85d740ea1b
Add GHA permission to upload security events 2022-11-03 08:26:46 +01:00
Till Faelligen f5b11e30a4
Hopefully fix GHA sarif upload 2022-11-03 08:20:51 +01:00
devonh 4afadebd99
Add readme for dendrite-demo-pinecone (#2851) 2022-11-02 20:29:30 +00:00
Neil Alexander ef52731e9f
Tweak FLAGS in GHA Docker builds 2022-11-02 14:41:38 +00:00
Neil Alexander 9c0725feac
Maybe fix GHA 2022-11-02 14:09:19 +00:00
Neil Alexander ca8bc87380
Multi-stage Docker builds (#2850)
This builds on @S7evinK's work to make multi-stage Docker builds. Now
that we can build SQLite without Cgo this should be much simpler and
should make Docker builds in CI significantly faster.

Co-authored-by: Till Faelligen <tfaelligen@gmail.com>
Co-authored-by: Till Faelligen <davidf@element.io>
Co-authored-by: Till Faelligen <2353100+S7evinK@users.noreply.github.com>
2022-11-02 14:04:08 +00:00
0x1a8510f2 51ab0a8ccf
Fix moderncsqlite errors and rebase onto main (#2832)
This is #2819 but rebased on latest `main`. This PR is against main too
as opposed to the `moderncsqlite` branch.

The main change here is simply:

```go
// add query parameters to the dsn
if strings.Contains(dsn, "?") {
	dsn += "&"
} else {
	dsn += "?"
}

// wait some time before erroring if the db is locked
// https://gitlab.com/cznic/sqlite/-/issues/106#note_1058094993
dsn += "_pragma=busy_timeout%3d10000"
```

### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [x] I have added tests for 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 privately.

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-11-02 13:20:10 +00:00
Neil Alexander 16c2a95900
Improve logging for processEventWithMissingState 2022-11-02 11:30:49 +00:00
Till 86b25a6337
Add message stats to reporting (#2748)
Since we're now listening on the `OutputRoomEvent` stream, we are able
to store messages stats.
2022-11-02 10:18:11 +00:00
Till b367cfeddf
Implement /thirdparty endpoints (#2831)
Implements the following endpoints 
```
GET /_matrix/client/v3/thirdparty/protocols
GET /_matrix/client/v3/thirdparty/protocols/{protocol}
GET /_matrix/client/v3/thirdparty/location
GET /_matrix/client/v3/thirdparty/location/{protocol}
GET /_matrix/client/v3/thirdparty/user
GET /_matrix/client/v3/thirdparty/user/{protocol}
```
2022-11-02 10:17:53 +00:00
Tak Wai Wong 75a508cc27
Fix issue where a member is forced to leave a room when the invite is marked deleted (#2839)
Proposed fix for issue:
https://github.com/matrix-org/dendrite/issues/2838

Suppose bob received invites to spaceA and spaceB.
When Bob joins spaceA, we add an OutputEvent event to retire the invite.
This sets the invite to "deleted" in the database. This makes sense.

The bug is in stream_invites.go. Triggered when bob received a new
invite for spaceB, and does a client sync.

In the block (line 76)
`for roomID := range retiredInvites

   if _, ok := req.Response.Rooms.Invite[roomID]; ok {
	continue
   }

   if _, ok := req.Response.Rooms.Join[roomID]; ok {
	continue
  }
...
` 

Bob is not in either maps even though he had just accepted the invite
for spaceA. Consequently, the spaceA invite is treated as a retired
invite, and a membership Leave event is generated. What bob sees is that
after accepting the invite to spaceB, he lose access to spaceA.


### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [ ] I have added tests for 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: `Tak Wai Wong <tak@hntlabs.com>`

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-11-02 10:02:23 +00:00
Neil Alexander 3db9e98456
Don't limit "state" (#2849)
This is apparently some incorrect behaviour that we built as a result of
a spec bug (matrix-org/matrix-spec#1314) where we were applying a filter
to the `"state"` section of the `/sync` response incorrectly. The client
then has no way to know that the state was limited.

This PR removes the state limiting, which probably also helps #2842.
2022-11-02 09:34:19 +00:00
Neil Alexander 8a1904ffe5
Update pull request template 2022-11-02 09:33:00 +00:00
Neil Alexander 52478dac3c
Version 0.10.6 2022-11-01 17:14:30 +00:00
Neil Alexander 501977f6fe
Fix a panic in ToClientEvents etc. 2022-11-01 16:58:51 +00:00