mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 15:03:09 -06:00
address review comments
This commit is contained in:
parent
e73b3d3ebb
commit
635bc39102
|
|
@ -318,8 +318,8 @@ func generateSendEvent(
|
||||||
senderID, err := rsAPI.QuerySenderIDForUser(ctx, *validRoomID, *fullUserID)
|
senderID, err := rsAPI.QuerySenderIDForUser(ctx, *validRoomID, *fullUserID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, &util.JSONResponse{
|
return nil, &util.JSONResponse{
|
||||||
Code: http.StatusNotFound,
|
Code: http.StatusInternalServerError,
|
||||||
JSON: spec.NotFound("Unable to find senderID for user"),
|
JSON: spec.NotFound("internal server error"),
|
||||||
}
|
}
|
||||||
} else if senderID == nil {
|
} else if senderID == nil {
|
||||||
// TODO: is it always the case that lack of a sender ID means they're not joined?
|
// TODO: is it always the case that lack of a sender ID means they're not joined?
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ func (t *OutputPresenceConsumer) onMessage(ctx context.Context, msgs []*nats.Msg
|
||||||
|
|
||||||
parsedUserID, err := spec.NewUserID(userID, true)
|
parsedUserID, err := spec.NewUserID(userID, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
util.GetLogger(ctx).WithError(err).WithField("user_id", userID).Error("failed to extract domain from receipt sender")
|
util.GetLogger(ctx).WithError(err).WithField("user_id", userID).Error("invalid user ID")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue