mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 12:52:24 +03:00
[pseudoID] More pseudo ID fixes (#3167)
Signed-off-by: `Sam Wedgwood <sam@wedgwood.dev>`
This commit is contained in:
parent
fa6c7ba456
commit
9a12420428
24 changed files with 472 additions and 237 deletions
|
@ -316,10 +316,17 @@ func generateSendEvent(
|
|||
}
|
||||
}
|
||||
senderID, err := rsAPI.QuerySenderIDForUser(ctx, *validRoomID, *fullUserID)
|
||||
if err != nil || senderID == nil {
|
||||
if err != nil {
|
||||
return nil, &util.JSONResponse{
|
||||
Code: http.StatusNotFound,
|
||||
JSON: spec.NotFound("Unable to find senderID for user"),
|
||||
Code: http.StatusInternalServerError,
|
||||
JSON: spec.NotFound("internal server error"),
|
||||
}
|
||||
} else if senderID == nil {
|
||||
// TODO: is it always the case that lack of a sender ID means they're not joined?
|
||||
// And should this logic be deferred to the roomserver somehow?
|
||||
return nil, &util.JSONResponse{
|
||||
Code: http.StatusForbidden,
|
||||
JSON: spec.Forbidden("not joined to room"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue