aboutsummaryrefslogtreecommitdiff
path: root/roomserver/internal/perform/perform_join.go
diff options
context:
space:
mode:
Diffstat (limited to 'roomserver/internal/perform/perform_join.go')
-rw-r--r--roomserver/internal/perform/perform_join.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/roomserver/internal/perform/perform_join.go b/roomserver/internal/perform/perform_join.go
index a836eb1a..5f4ad186 100644
--- a/roomserver/internal/perform/perform_join.go
+++ b/roomserver/internal/perform/perform_join.go
@@ -145,7 +145,7 @@ func (r *Joiner) performJoinRoomByAlias(
return r.performJoinRoomByID(ctx, req)
}
-// TODO: Break this function up a bit
+// TODO: Break this function up a bit & move to GMSL
// nolint:gocyclo
func (r *Joiner) performJoinRoomByID(
ctx context.Context,
@@ -286,7 +286,7 @@ func (r *Joiner) performJoinRoomByID(
}
event, err := eventutil.QueryAndBuildEvent(ctx, &proto, r.Cfg.Matrix, identity, time.Now(), r.RSAPI, &buildRes)
- switch err {
+ switch err.(type) {
case nil:
// The room join is local. Send the new join event into the
// roomserver. First of all check that the user isn't already
@@ -328,7 +328,7 @@ func (r *Joiner) performJoinRoomByID(
// Otherwise we'll try a federated join as normal, since it's quite
// possible that the room still exists on other servers.
if len(req.ServerNames) == 0 {
- return "", "", eventutil.ErrRoomNoExists
+ return "", "", eventutil.ErrRoomNoExists{}
}
}