Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
4691adc
Update MSC2946 implementation for stable spaces (#1859)
t3chguy May 18, 2021
140cae8
Update dendrite-demo-pinecone
neilalexander May 18, 2021
e9e0309
Merge branch 'master' of github.com:matrix-org/dendrite
neilalexander May 18, 2021
08a4370
Update go.mod/go.sum
neilalexander May 18, 2021
2948ffd
Update go.mod/go.sum
neilalexander May 18, 2021
d2d2164
Update pinecone demo
neilalexander May 24, 2021
79c5485
Allow clearing federation blacklist at startup for P2P demos
neilalexander May 24, 2021
a7f2845
Demo tweaks
neilalexander May 24, 2021
30f0217
Update go.mod/go.sum
neilalexander May 25, 2021
3f84cd6
Update go.mod/go.sum
neilalexander May 25, 2021
3797d81
Update gomatrixserverlib to matrix-org/gomatrixserverlib#259
neilalexander May 25, 2021
b0aa101
Update go.mod/go.sum for matrix-org/pinecone (Build 79)
neilalexander Jun 2, 2021
f18001e
Split the select+update query for txn_id counter (#1855)
bodqhrohro Jun 7, 2021
c488d3d
Fix SIGSEGV in IsInterestedInRoomID (#1846)
bodqhrohro Jun 7, 2021
8b22c42
Use LimitReader to prevent DoS risk (#1843)
S7evinK Jun 7, 2021
89a6787
Try to optimize SelectOneTimeKeys (#1851)
S7evinK Jun 7, 2021
6fa5743
Add missing IPv6 "ssl" keyword in nginx config examples (#1854)
toadjaune Jun 7, 2021
caa5c89
Link to Synapse (#1863)
benlangfeld Jun 7, 2021
2c9a390
Add CORS to nginx config (#1791)
Cogitri Jun 7, 2021
bd9dec8
Pinecone demo updates
neilalexander Jun 14, 2021
051cd63
Update go.mod/go.sum
neilalexander Jun 14, 2021
eae1c46
Use NotFound instead of Forbidden for missing account data (#1872)
adamgreig Jun 14, 2021
183f43d
Add parameters to specify password (#1868)
S7evinK Jun 14, 2021
ce574f5
Fix Key Generation Docs - resolves #1759 (#1865)
benyanke Jun 14, 2021
9633ed7
Remove mention of enabling naffka in install instructions, as it is t…
toadjaune Jun 14, 2021
9ed0440
Set MaxFileSizeBytes <= 0 to "unlimited" (#1875)
S7evinK Jun 14, 2021
5ec7d3a
Update go.mod/go.sum
neilalexander Jun 14, 2021
30e9353
Ensure user IDs match the spec (matrix-org/gomatrixserverlib#261)
neilalexander Jun 15, 2021
3a77bca
Revert "Ensure user IDs match the spec (matrix-org/gomatrixserverlib#…
neilalexander Jun 16, 2021
5357df3
Fix panic in roomserver
neilalexander Jun 21, 2021
79181f2
✂️ Media API: Handle unlimited file size (#1881)
database64128 Jun 22, 2021
6ae976a
dendrite-demo-pinecone: Accept any origin
neilalexander Jun 22, 2021
097a583
dendritejs-pinecone
neilalexander Jun 25, 2021
bd7b0b1
Update go.mod/go.sum
neilalexander Jun 25, 2021
a6f7e83
Fix bugs in P2P demos
neilalexander Jun 25, 2021
7c3991e
Use a custom FIFO queue for the RS input API (#1888)
neilalexander Jun 28, 2021
4417f24
Protect processEventWithMissingState with per-room mutex, to prevent …
neilalexander Jun 28, 2021
f645646
Restore the getServers RS query (needs optimisation)
neilalexander Jun 29, 2021
e2b6a90
Put gmectx back to 5 minutes
neilalexander Jun 29, 2021
c849e74
db migration: fix #1844 and add additional assertions (#1889)
kegsay Jun 29, 2021
3afb161
Reduce memory usage in federation /send endpoint (#1890)
neilalexander Jun 30, 2021
0e69212
Give up on loops when the context expires (#1891)
neilalexander Jun 30, 2021
b7a2d36
Change how servers are selected for missing auth/prev events (#1892)
neilalexander Jun 30, 2021
2647f6e
Fix concurrent map read/write on haveEvents (#1893)
neilalexander Jun 30, 2021
192a7a7
Roomserver input backpressure metric
neilalexander Jul 2, 2021
5732089
Federation API workers for /send to reduce memory usage (#1897)
neilalexander Jul 2, 2021
6bb994b
Update to matrix-org/gomatrixserverlib#265 for faster power level con…
neilalexander Jul 2, 2021
355ce7e
Update to matrix-org/gomatrixserverlib#266 (+ missing file)
neilalexander Jul 2, 2021
7f02eab
Remove processEventWithMissingStateMutex
neilalexander Jul 5, 2021
99d8e1c
Federation API fixes (#1899)
neilalexander Jul 5, 2021
bcd3ef3
Track expiry rate on pduCountTotal
neilalexander Jul 5, 2021
d72d634
Add dendrite-upgrade-test (#1901)
kegsay Jul 7, 2021
bb6e448
dendrite-upgrade-test: support --from HEAD-N, cleanup on startup (#1903)
kegsay Jul 7, 2021
5a09290
db migration: handle create events with no state blocks from v0.1.0 (…
kegsay Jul 7, 2021
f297472
Fix concurrent map reads/writes on t.hadEvents (#1902)
neilalexander Jul 7, 2021
717d163
Improve error handling and close files post-tarring
kegsay Jul 8, 2021
3fb5ee7
linting
kegsay Jul 8, 2021
ef331c5
dendrite-upgrade-test: tweaks to get it to run under CI in docker (#1…
kegsay Jul 8, 2021
70e4bbd
Only log filename and not entire path (#1906)
kegsay Jul 8, 2021
816e1a4
Fix bug when rejecting invites (#1907)
neilalexander Jul 8, 2021
3e50bac
bugfix: order the state blocks so recreating state snapshots works co…
kegsay Jul 9, 2021
c8408a6
Add more optimised code path for checking if we're in a room (#1909)
neilalexander Jul 9, 2021
1ed732c
Implement /_synapse/admin/v1/register (#1911)
kegsay Jul 9, 2021
acec6fa
Move a couple of callers to helpers.IsServerCurrentlyInRoom over to t…
neilalexander Jul 9, 2021
e48a08f
Propose config better (#1758)
melroy89 Jul 12, 2021
0530302
Add shared secret sytests to whitelist
kegsay Jul 12, 2021
89a16bd
Version 0.4.0
neilalexander Jul 12, 2021
48bdd79
Fix attribution in changelog
neilalexander Jul 12, 2021
ea477d7
Update blacklist
kegsay Jul 12, 2021
b130fab
Update are we synapse groupings (#1913)
kegsay Jul 12, 2021
93cf1e7
Actually bump GMSL
kegsay Jul 12, 2021
f698142
update whitelist (#1914)
kegsay Jul 12, 2021
f8ae391
Expose more data when outputting output room events (#1916)
kegsay Jul 13, 2021
7df3e69
Fix failing complement test (#1917)
kegsay Jul 13, 2021
e80098e
bugfix: retire invites even when we cannot talk to the remote server …
kegsay Jul 14, 2021
2713d19
AWSY: update list and shuffle groups (#1919)
kegsay Jul 14, 2021
fa1397c
Remove unused binaries
neilalexander Jul 14, 2021
e8de96b
sytests: fix failing PL tests by updating GMSL (#1920)
kegsay Jul 14, 2021
c211fdf
Add missing sytest to whitelist
kegsay Jul 14, 2021
1827dd7
Update dendrite-demo-yggdrasil to Yggdrasil 0.4 (#1921)
neilalexander Jul 15, 2021
c102ada
fedsender: add cache tables for notary keys (#1923)
kegsay Jul 15, 2021
728061d
fedsender: try to satisfy all notary key requests from the cache firs…
kegsay Jul 16, 2021
b954343
Fix DNS CacheLifetime (#1926)
S7evinK Jul 16, 2021
af64e64
Fix failing Complement tests (#1931)
kegsay Jul 19, 2021
628e4cc
Update to matrix-org/gomatrixserverlib#269
neilalexander Jul 19, 2021
b20d402
dendrite_roomserver_calculate_state_duration_microseconds as histogra…
neilalexander Jul 19, 2021
eb2a8e4
Set buckets for dendrite_roomserver_calculate_state_duration_microsec…
neilalexander Jul 19, 2021
09d3bab
Metric fixes
neilalexander Jul 19, 2021
5094bc8
Set MaxFileSizeBytes <= 0 to unlimited (#1876)
S7evinK Jul 19, 2021
8d8fe48
Fix failing ban tests (#1884)
DavidSpenler Jul 19, 2021
da2023b
Rename Riot to Element (#1874)
S7evinK Jul 20, 2021
0ff078e
Fixed log printing bug (closes #1885)
neilalexander Jul 20, 2021
f63068d
Only include go-sqlite3 on the relevant binaries (#1900)
neilalexander Jul 20, 2021
034f5ae
Add startup testing for Wasm Pinecone build (#1910)
jryans Jul 20, 2021
c6acb94
Update to matrix-org/gomatrixserverlib#270
neilalexander Jul 20, 2021
2f5e4f5
Support initial_state properly in `/createRoom` (#1932)
neilalexander Jul 21, 2021
f0f8c7f
Optimise QueryServerJoinedToRoom (#1933)
neilalexander Jul 21, 2021
c1447a5
Various alias fixes (#1934)
neilalexander Jul 21, 2021
7650998
Update to matrix-org/gomatrixserverlib#271
neilalexander Jul 21, 2021
9008b1c
Update to matrix-org/gomatrixserverlib@ae88543
neilalexander Jul 21, 2021
43ac66e
Update to matrix-org/gomatrixserverlib@b9eb787
neilalexander Jul 22, 2021
39e8d1c
Track knocking in membership updater (#1935)
neilalexander Jul 22, 2021
75d0f00
Don't set prev state when it is the same as the event it replaces (#1…
neilalexander Jul 22, 2021
fa1ec48
fix:Inviting to an unsupported room version return M_BAD_JSON instead…
meenal06 Jul 26, 2021
16bf94f
Not finding the snapshot is not fatal (#1940)
kegsay Jul 26, 2021
e367979
Version 0.4.1
neilalexander Jul 26, 2021
3253864
Key backups (1/2) : Add E2E session backup metadata tables (#1943)
kegsay Jul 27, 2021
a060df9
Use db writer on sqlite account table (#1944)
kegsay Jul 27, 2021
b3754d6
Key Backups (2/3) : Add E2E backup key tables (#1945)
kegsay Jul 27, 2021
32bf14a
Key Backups (3/3) : Implement querying keys and various bugfixes (#1946)
kegsay Jul 27, 2021
3e01a88
Update to neilalexander/utp@54ae7b1
neilalexander Jul 27, 2021
9e46180
Alias key backup endpoints onto /unstable, fix key backup bugs (#1947)
neilalexander Jul 28, 2021
ed40978
Factor out StatementList to `sqlutil` and use it in `userapi`
kegsay Jul 28, 2021
a22ab3e
Read the right username field when performing account deactivation (#…
kegsay Aug 2, 2021
a81c499
Update dependencies (#1956)
neilalexander Aug 3, 2021
d4aa311
Update containerd dependency
neilalexander Aug 3, 2021
e3df612
Add tracing to user API (#1948)
kegsay Aug 3, 2021
da10146
Minimum version Go 1.15 (#1957)
neilalexander Aug 3, 2021
ed04eed
Fix sqlite migration issues (#1960)
kegsay Aug 4, 2021
7a9a254
Cross-signing storage code (#1959)
neilalexander Aug 4, 2021
4cc8b28
Ensure all create events have a snapshot NID of 0 (#1961)
kegsay Aug 4, 2021
eb0efa4
Cross-signing groundwork (#1953)
neilalexander Aug 4, 2021
8e5a013
Update to matrix-org/gomatrixserverlib@03e40fa
neilalexander Aug 5, 2021
e95b1fd
Cross-signing validation for self-sigs, expose signatures over `/user…
neilalexander Aug 6, 2021
b1377d9
Cross-signing signature handling (#1965)
neilalexander Aug 9, 2021
125ea75
Add type field to DeviceMessage, allow fields to be nullable (#1969)
neilalexander Aug 11, 2021
c2b9ab7
Fix ineffectual error assignment (#1976)
dmizelle Aug 16, 2021
8a4b90b
Update golangci-lint (#1978)
S7evinK Aug 17, 2021
ff21675
Cross-signing fixes, notifications via sync, federation (#1974)
neilalexander Aug 17, 2021
1bee1ae
Syslog integration (#1952)
9p4 Aug 17, 2021
614e672
Delete device keys/signatures from key server when deleting devices (…
neilalexander Aug 18, 2021
fe5050c
Add and use M_ROOM_IN_USE (#1972)
nivekuil Aug 18, 2021
cf42ae6
Build Docker images using Go 1.17
neilalexander Aug 18, 2021
cd38233
Version 0.5.0rc1
neilalexander Aug 18, 2021
9a2dcd6
Update to matrix-org/pinecone@21e3b392289b9412aa0d290f9f03fe9a1f8909e9
neilalexander Aug 19, 2021
329c9e6
Update to matrix-org/pinecone@e692df1
neilalexander Aug 19, 2021
4b0cc32
Hopefully fix UIA for cross-signing setup (closes #1983) (#1986)
neilalexander Aug 24, 2021
037ff4f
Version 0.5.0
neilalexander Aug 24, 2021
5af5d7c
Merge branch 'master' into release/v0.5.0
PiotrKozimor Sep 7, 2021
4223cb1
Remove unnecessary github actions
PiotrKozimor Sep 7, 2021
854934c
Run gofmt
PiotrKozimor Sep 7, 2021
5c05498
Extract email string as constant
PiotrKozimor Sep 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 0 additions & 71 deletions .github/workflows/docker-hub.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/wasm.yml

This file was deleted.

16 changes: 16 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## Dendrite 0.5.0 (2021-08-24)

### Features

* Support for serverside key backups has been added, allowing your E2EE keys to be backed up and to be restored after logging out or when logging in from a new device
* Experimental support for cross-signing has been added, allowing verifying your own device keys and verifying other user's public keys
* Dendrite can now send logs to a TCP syslog server by using the `syslog` logger type (contributed by [sambhavsaggi](https://github.com/sambhavsaggi))
* Go 1.15 is now the minimum supported version for Dendrite

### Fixes

* Device keys are now cleaned up from the keyserver when the user API removes a device session
* The `M_ROOM_IN_USE` error code is now returned when a room alias is already taken (contributed by [nivekuil](https://github.com/nivekuil))
* A bug in the state storage migration has been fixed where room create events had incorrect state snapshots
* A bug when deactivating accounts caused by only reading the deprecated username field has been fixed

## Dendrite 0.4.1 (2021-07-26)

### Features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If you have further questions, please take a look at [our FAQ](docs/FAQ.md) or j

## Requirements

To build Dendrite, you will need Go 1.13 or later.
To build Dendrite, you will need Go 1.15 or later.

For a usable federating Dendrite deployment, you will also need:
- A domain name (or subdomain)
Expand Down
7 changes: 7 additions & 0 deletions appservice/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func (a *AppServiceQueryAPI) RoomAliasExists(
if appservice.URL != "" && appservice.IsInterestedInRoomAlias(request.Alias) {
// The full path to the rooms API, includes hs token
URL, err := url.Parse(appservice.URL + roomAliasExistsPath)
if err != nil {
return err
}

URL.Path += request.Alias
apiURL := URL.String() + "?access_token=" + appservice.HSToken

Expand Down Expand Up @@ -114,6 +118,9 @@ func (a *AppServiceQueryAPI) UserIDExists(
if appservice.URL != "" && appservice.IsInterestedInUserID(request.UserID) {
// The full path to the rooms API, includes hs token
URL, err := url.Parse(appservice.URL + userIDExistsPath)
if err != nil {
return err
}
URL.Path += request.UserID
apiURL := URL.String() + "?access_token=" + appservice.HSToken

Expand Down
1 change: 1 addition & 0 deletions appservice/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !wasm
// +build !wasm

package storage
Expand Down
2 changes: 1 addition & 1 deletion build/docker/Dockerfile.monolith
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/golang:1.15-alpine AS base
FROM docker.io/golang:1.17-alpine AS base

RUN apk --update --no-cache add bash build-base

Expand Down
2 changes: 1 addition & 1 deletion build/docker/Dockerfile.polylith
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/golang:1.15-alpine AS base
FROM docker.io/golang:1.17-alpine AS base

RUN apk --update --no-cache add bash build-base

Expand Down
2 changes: 1 addition & 1 deletion build/gobind-pinecone/monolith.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func (m *DendriteMonolith) Start() {
base, federation, rsAPI, keyRing, true,
)

keyAPI := keyserver.NewInternalAPI(&base.Cfg.KeyServer, fsAPI)
keyAPI := keyserver.NewInternalAPI(base, &base.Cfg.KeyServer, fsAPI)
m.userAPI = userapi.NewInternalAPI(accountDB, &cfg.UserAPI, cfg.Derived.ApplicationServices, keyAPI)
keyAPI.SetUserAPI(m.userAPI)

Expand Down
1 change: 1 addition & 0 deletions build/gobind-pinecone/platform_ios.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build ios
// +build ios

package gobind
Expand Down
1 change: 1 addition & 0 deletions build/gobind-pinecone/platform_other.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !ios
// +build !ios

package gobind
Expand Down
2 changes: 1 addition & 1 deletion build/gobind-yggdrasil/monolith.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (m *DendriteMonolith) Start() {
base, federation, rsAPI, keyRing, true,
)

keyAPI := keyserver.NewInternalAPI(&base.Cfg.KeyServer, federation)
keyAPI := keyserver.NewInternalAPI(base, &base.Cfg.KeyServer, federation)
userAPI := userapi.NewInternalAPI(accountDB, &cfg.UserAPI, cfg.Derived.ApplicationServices, keyAPI)
keyAPI.SetUserAPI(userAPI)

Expand Down
1 change: 1 addition & 0 deletions build/gobind-yggdrasil/platform_ios.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build ios
// +build ios

package gobind
Expand Down
1 change: 1 addition & 0 deletions build/gobind-yggdrasil/platform_other.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !ios
// +build !ios

package gobind
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/find-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ echo "Installing golangci-lint..."

# Make a backup of go.{mod,sum} first
cp go.mod go.mod.bak && cp go.sum go.sum.bak
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1

# Run linting
echo "Looking for lint..."
Expand Down
8 changes: 5 additions & 3 deletions clientapi/auth/password.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (
"github.com/matrix-org/util"
)

const email = "email"

type GetAccountByPassword func(ctx context.Context, localpart, password string) (*api.Account, error)

type PasswordRequest struct {
Expand Down Expand Up @@ -59,9 +61,9 @@ func (t *LoginTypePassword) Login(ctx context.Context, req interface{}) (*Login,
if username != "" {
localpart, err = userutil.ParseUsernameParam(username, &t.Config.Matrix.ServerName)
} else {
if r.Medium == "email" {
if r.Medium == email {
if r.Address != "" {
localpart, err = t.AccountDB.GetLocalpartForThreePID(ctx, r.Address, "email")
localpart, err = t.AccountDB.GetLocalpartForThreePID(ctx, r.Address, email)
if localpart == "" {
return nil, &util.JSONResponse{
Code: http.StatusForbidden,
Expand Down Expand Up @@ -94,7 +96,7 @@ func (t *LoginTypePassword) Login(ctx context.Context, req interface{}) (*Login,
// but that would leak the existence of the user.
return nil, &util.JSONResponse{
Code: http.StatusForbidden,
JSON: jsonerror.Forbidden("username or password was incorrect, or the account does not exist"),
JSON: jsonerror.Forbidden("The username or password was incorrect or the account does not exist."),
}
}
return &r.Login, nil
Expand Down
4 changes: 2 additions & 2 deletions clientapi/auth/user_interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (u *UserInteractive) Verify(ctx context.Context, bodyBytes []byte, device *
if !ok {
return nil, &util.JSONResponse{
Code: http.StatusBadRequest,
JSON: jsonerror.BadJSON("unknown auth.type: " + authType),
JSON: jsonerror.BadJSON("Unknown auth.type: " + authType),
}
}

Expand All @@ -231,7 +231,7 @@ func (u *UserInteractive) Verify(ctx context.Context, bodyBytes []byte, device *
if !u.IsSingleStageFlow(authType) {
return nil, &util.JSONResponse{
Code: http.StatusBadRequest,
JSON: jsonerror.Unknown("missing or unknown auth.session"),
JSON: jsonerror.Unknown("The auth.session is missing or unknown."),
}
}
}
Expand Down
24 changes: 24 additions & 0 deletions clientapi/jsonerror/jsonerror.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ func UserInUse(msg string) *MatrixError {
return &MatrixError{"M_USER_IN_USE", msg}
}

// RoomInUse is an error returned when the client tries to make a room
// that already exists
func RoomInUse(msg string) *MatrixError {
return &MatrixError{"M_ROOM_IN_USE", msg}
}

// ASExclusive is an error returned when an application service tries to
// register an username that is outside of its registered namespace, or if a
// user attempts to register a username or room alias within an exclusive
Expand All @@ -125,6 +131,24 @@ func GuestAccessForbidden(msg string) *MatrixError {
return &MatrixError{"M_GUEST_ACCESS_FORBIDDEN", msg}
}

// InvalidSignature is an error which is returned when the client tries
// to upload invalid signatures.
func InvalidSignature(msg string) *MatrixError {
return &MatrixError{"M_INVALID_SIGNATURE", msg}
}

// InvalidParam is an error that is returned when a parameter was invalid,
// traditionally with cross-signing.
func InvalidParam(msg string) *MatrixError {
return &MatrixError{"M_INVALID_PARAM", msg}
}

// MissingParam is an error that is returned when a parameter was incorrect,
// traditionally with cross-signing.
func MissingParam(msg string) *MatrixError {
return &MatrixError{"M_MISSING_PARAM", msg}
}

type IncompatibleRoomVersionError struct {
RoomVersion string `json:"room_version"`
Error string `json:"error"`
Expand Down
10 changes: 8 additions & 2 deletions clientapi/routing/createroom.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,10 @@ func createRoom(
return jsonerror.InternalServerError()
}
if aliasResp.RoomID != "" {
return util.MessageResponse(400, "Alias already exists")
return util.JSONResponse{
Code: http.StatusBadRequest,
JSON: jsonerror.RoomInUse("Room ID already exists."),
}
}

aliasEvent = &fledglingEvent{
Expand Down Expand Up @@ -484,7 +487,10 @@ func createRoom(
}

if aliasResp.AliasExists {
return util.MessageResponse(400, "Alias already exists")
return util.JSONResponse{
Code: http.StatusBadRequest,
JSON: jsonerror.RoomInUse("Room alias already exists."),
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion clientapi/routing/deactivate.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func Deactivate(
return *errRes
}

localpart, _, err := gomatrixserverlib.SplitID('@', login.User)
localpart, _, err := gomatrixserverlib.SplitID('@', login.Username())
if err != nil {
util.GetLogger(req.Context()).WithError(err).Error("gomatrixserverlib.SplitID failed")
return jsonerror.InternalServerError()
Expand Down
Loading