diff options
Diffstat (limited to 'clientapi/routing/joinroom.go')
-rw-r--r-- | clientapi/routing/joinroom.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clientapi/routing/joinroom.go b/clientapi/routing/joinroom.go index 4e6acebc..c50e552b 100644 --- a/clientapi/routing/joinroom.go +++ b/clientapi/routing/joinroom.go @@ -81,8 +81,9 @@ func JoinRoomByIDOrAlias( done := make(chan util.JSONResponse, 1) go func() { defer close(done) - rsAPI.PerformJoin(req.Context(), &joinReq, &joinRes) - if joinRes.Error != nil { + if err := rsAPI.PerformJoin(req.Context(), &joinReq, &joinRes); err != nil { + done <- jsonerror.InternalAPIError(req.Context(), err) + } else if joinRes.Error != nil { done <- joinRes.Error.JSONResponse() } else { done <- util.JSONResponse{ |