KuhnChris
532cdd1f45
Make it more go
...
Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com>
2023-07-03 16:48:44 +02:00
KuhnChris
eb51b1d24e
Allow loginflows based on config
2023-07-03 14:45:02 +02:00
KuhnChris
27f2867984
more cleanups
2023-06-30 12:28:07 +02:00
KuhnChris
bf053595ae
Clean up merge from main
2023-06-30 12:28:07 +02:00
KuhnChris
814e2b8e0e
Apparently that cfg structure was there on purpose.
2023-06-30 12:28:07 +02:00
KuhnChris
843a3038fc
🤷
2023-06-30 12:28:07 +02:00
KuhnChris
1020f604e8
linting
2023-06-30 12:28:07 +02:00
Sijmen Schoon
25f2b51c3d
Move UsernameMatchesExclusiveNamespaces back to register.go
2023-06-30 12:28:07 +02:00
Sijmen Schoon
923f47c3a8
Improve documentation and naming
2023-06-30 12:28:07 +02:00
Sijmen Schoon
4cca740ecf
Replace handcrafted genHTTPRequest with httptest.NewRequest
2023-06-30 12:28:07 +02:00
Sijmen Schoon
d46267f9ef
Simplify GET /login and add test for it
2023-06-30 12:28:07 +02:00
Sijmen Schoon
9bef2876b4
Add tests for m.login.application_service
...
Signed-off-by: Sijmen Schoon <me@sijman.nl>
2023-06-30 12:28:07 +02:00
Sijmen Schoon
019a5d0e87
Make ValidateApplicationService work with UserIDs and move to internal
...
Signed-off-by: Sijmen <me@sijman.nl>
Signed-off-by: Sijmen Schoon <me@sijman.nl>
2023-06-30 12:28:07 +02:00
Sijmen Schoon
20b0bfaac0
Implement POST /login for LoginTypeApplicationService
...
Signed-off-by: Sijmen <me@sijman.nl>
Signed-off-by: Sijmen Schoon <me@sijman.nl>
2023-06-30 12:28:07 +02:00
Sijmen Schoon
29bf744832
Move ValidateApplicationService to a separate package for reuse
...
Signed-off-by: Sijmen <me@sijman.nl>
Signed-off-by: Sijmen Schoon <me@sijman.nl>
2023-06-30 12:28:07 +02:00
Sijmen Schoon
4899bdb663
Add LoginTypeApplicationService to GET /login
...
Signed-off-by: Sijmen <me@sijman.nl>
Signed-off-by: Sijmen Schoon <me@sijman.nl>
2023-06-30 12:28:07 +02:00
Sijmen Schoon
56f6ad1362
Replace "m.login.password" with authtypes constant
...
Signed-off-by: Sijmen <me@sijman.nl>
Signed-off-by: Sijmen Schoon <me@sijman.nl>
2023-06-30 12:28:07 +02:00
Till
23cd7877a1
Add MXIDMapping for pseudoID rooms ( #3112 )
...
Add `MXIDMapping` on membership events when
creating/joining rooms.
2023-06-28 20:29:49 +02:00
Till
4722f12fab
Fix setting displayname and avatar_url ( #3125 )
...
As per the spec, `displayname` and `avatar_url` may be empty.
2023-06-28 20:18:07 +02:00
santhoshivan23
45082d4dce
feat: admin APIs for token authenticated registration ( #3101 )
...
### 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: `Santhoshivan Amudhan santhoshivan23@gmail.com`
2023-06-22 16:37:21 +00:00
devonh
e4665979bf
Merge SenderID & Per Room User Key work ( #3109 )
2023-06-14 14:23:46 +00:00
devonh
77d9e4e93d
Cleanup remaining statekey usage for senderIDs ( #3106 )
2023-06-12 11:19:25 +00:00
devonh
8ea1a11105
Use SenderID Type ( #3105 )
2023-06-07 17:14:35 +00:00
devonh
7a1fd7f512
PDU Sender split ( #3100 )
...
Initial cut of splitting PDU Sender into SenderID & looking up UserID where required.
2023-06-06 20:55:18 +00:00
devonh
ea6b368ad4
Move Invite logic to GMSL ( #3086 )
...
This is both the federation receiving & sending side logic (which were
previously entangeld in a single function)
2023-05-31 16:33:49 +00:00
devonh
cbdc601f1b
Move CreateRoom logic to Roomserver ( #3093 )
...
Move create room logic over to roomserver.
2023-05-31 15:27:08 +00:00
Till
3dcca4017c
Fix potential state reset when trying to join a room ( #3040 )
...
When trying to join a room in short sequence, it is possible that a
state reset occurs. This fixes it by using `singleflight`.
2023-05-30 15:27:11 +02:00
Till
f956a8c1d9
Docs restructure ( #2953 )
...
Needs to be merged into `gh-pages` later on.
2023-05-30 10:02:53 +02:00
Till
11b557097c
Drop reference_sha column ( #3083 )
...
Companion PR to https://github.com/matrix-org/gomatrixserverlib/pull/383
2023-05-24 12:14:42 +02:00
devonh
67d6876857
Move MakeJoin logic to GMSL ( #3081 )
2023-05-17 00:33:27 +00:00
devonh
0489d16f95
Move json errors over to gmsl ( #3080 )
2023-05-09 22:46:49 +00:00
kegsay
2b34f88fde
Use ProtoEvent where needed instead of EventBuilder ( #3075 )
...
They are fundamentally different concepts, so should be represented as
such. Proto events are exchanged in /make_xxx calls over federation, and
made as "fledgling" events in /createRoom and general event sending.
*Building* events is a reasonably complex VERSION SPECIFIC process which
needs amongst other things, auth event providers, prev events, signing
keys, etc.
Requires https://github.com/matrix-org/gomatrixserverlib/pull/379
2023-05-04 11:17:42 +01:00
Devon Hudson
99b143d4d0
Fix flaky test in clientapi
2023-05-03 18:21:10 -06:00
kegsay
6284790f98
Use PDU in even more places ( #3074 )
...
- No longer rely on *Event returning from NewEventFrom... functions
Requires https://github.com/matrix-org/gomatrixserverlib/pull/377
2023-05-03 10:21:27 +01:00
kegsay
f5b3144dc3
Use PDU not *Event in HeaderedEvent ( #3073 )
...
Requires https://github.com/matrix-org/gomatrixserverlib/pull/376
This has numerous upsides:
- Less type casting to `*Event` is required.
- Making Dendrite work with `PDU` interfaces means we can swap out Event
impls more easily.
- Tests which represent weird event shapes are easier to write.
Part of a series of refactors on GMSL.
2023-05-02 15:03:16 +01:00
Devon Hudson
696cbb70b8
Pass federation API to roomserver in PurgeRoom tests
2023-05-01 21:28:10 -06:00
Till
9e9617ff84
Add key backup tests ( #3071 )
...
Also slightly refactors the functions and methods to rely less on the
req/res pattern we had for polylith.
Returns `M_WRONG_ROOM_KEYS_VERSION` for some endpoints as per the spec
2023-04-28 17:49:38 +02:00
Till
6b47cf0f6a
Remove PerformError ( #3066 )
...
This removes `PerformError`, which was needed when we still had
polylith.
This removes quite a bunch of
```go
if err != nil {
return err
}
if err := res.Error; err != nil {
return err.JSONResponse()
}
```
Hopefully can be read commit by commit. [skip ci]
2023-04-28 17:46:01 +02:00
kegsay
1432743d1a
Use PDU in more places ( #3072 )
2023-04-28 16:00:22 +01:00
kegsay
6171310307
Use PDU interface ( #3070 )
...
We only use it in a few places currently, enough to get things to
compile and run. We should be using it in much more places.
Similarly, in some places we cast []PDU back to []*Event, we need to not
do that. Likewise, in some places we cast PDU to *Event, we need to not
do that. For now though, hopefully this is a start.
2023-04-27 16:35:19 +01:00
Till
c6457cd4e5
Add CS API /keys tests ( #3069 )
...
This is slightly cheating, as the heavy lifting, with regards to key
generation, is done using `mautrix/go`.
2023-04-27 16:43:28 +02:00
kegsay
b189edf4f4
Remove gmsl.HeaderedEvent ( #3068 )
...
Replaced with types.HeaderedEvent _for now_. In reality we want to move
them all to gmsl.Event and only use HeaderedEvent when we _need_ to
bundle the version/event ID with the event (seriailsation boundaries,
and even then only when we don't have the room version).
Requires https://github.com/matrix-org/gomatrixserverlib/pull/373
2023-04-27 12:54:20 +01:00
Till
2475cf4b61
Add some roomserver UTs ( #3067 )
...
Adds tests for `QueryRestrictedJoinAllowed`, `IsServerAllowed` and
`PerformRoomUpgrade`. Refactors the `QueryRoomVersionForRoom` method to
accept a string and return a `gmsl.RoomVersion` instead of req/resp
structs.
Adds some more caching for `GetStateEvent`
This should also fix #2912 by ignoring state events belonging to other
users.
2023-04-27 08:07:13 +02:00
devonh
ed19efc5d7
Move fedclient interface over to gmsl ( #3061 )
...
Companion PR: https://github.com/matrix-org/gomatrixserverlib/pull/366
2023-04-24 16:23:25 +00:00
kegsay
4679098a64
Use IRoomVersion ( #3064 )
...
This is a step towards allowing arbitrary room version impls.
2023-04-24 11:50:37 +01:00
kegsay
72285b2659
refactor: update GMSL ( #3058 )
...
Sister PR to https://github.com/matrix-org/gomatrixserverlib/pull/364
Read this commit by commit to avoid going insane.
2023-04-19 15:50:33 +01:00
devonh
f66862958d
Remove event building duplication & push to GMSL ( #3056 )
...
Removes event building duplication and moves the funcionality into GMSL
since all the sub-steps are already there.
2023-04-14 15:03:07 +00:00
Till
c45d8cd688
Add pushrules tests ( #3044 )
...
partly takes care of https://github.com/matrix-org/dendrite/issues/2870
by making sure that rule IDs don't start with a dot.
Co-authored-by: kegsay <kegan@matrix.org>
2023-04-14 12:35:27 +01:00
kegsay
0db43f13a6
refactor: use latest GMSL which splits fed client from matrix room logic ( #3051 )
...
Part of a series of refactors on GMSL.
2023-04-06 09:55:01 +01:00
kegsay
3691423626
Move GMSL client types to Dendrite ( #3045 )
...
GMSL is intended for Federation only. Sister PR to
https://github.com/matrix-org/gomatrixserverlib/pull/357
2023-04-04 17:16:53 +00:00