From 518697fd87f781a72bec8d76300b6fe410c54a83 Mon Sep 17 00:00:00 2001 From: Till <2353100+S7evinK@users.noreply.github.com> Date: Thu, 5 Jun 2025 21:07:37 +0200 Subject: [PATCH] Return correct error message when sending server notices (#3594) Fixes #3502 ### Pull Request Checklist * [x] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [x] Pull request includes a [sign off below](https://element-hq.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: Till Faelligen <2353100+S7evinK@users.noreply.github.com> --- clientapi/routing/server_notices.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientapi/routing/server_notices.go b/clientapi/routing/server_notices.go index 84615867..f8779182 100644 --- a/clientapi/routing/server_notices.go +++ b/clientapi/routing/server_notices.go @@ -100,7 +100,7 @@ func SendServerNotice( for _, membership := range []string{"join", "invite", "leave"} { userRooms, queryErr := rsAPI.QueryRoomsForUser(ctx, *userID, membership) if queryErr != nil { - return util.ErrorResponse(err) + return util.ErrorResponse(queryErr) } allUserRooms = append(allUserRooms, userRooms...) }