From 8d2da78744387e55c28bb8925ae0cc70dd3e02e3 Mon Sep 17 00:00:00 2001 From: robinsdan <115981357+robinsdan@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:53:30 +0800 Subject: [PATCH] fix device deletion (#3614) ### Pull Request Checklist * [ ] 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 * [ ] 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: `robinsdan <115981357+robinsdan@users.noreply.github.com>` --- userapi/internal/user_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userapi/internal/user_api.go b/userapi/internal/user_api.go index 666e75f9..48fb441a 100644 --- a/userapi/internal/user_api.go +++ b/userapi/internal/user_api.go @@ -337,7 +337,7 @@ func (a *UserInternalAPI) PerformDeviceDeletion(ctx context.Context, req *api.Pe deleteReq := &api.PerformDeleteKeysRequest{ UserID: req.UserID, } - for _, keyID := range req.DeviceIDs { + for _, keyID := range deletedDeviceIDs { deleteReq.KeyIDs = append(deleteReq.KeyIDs, gomatrixserverlib.KeyID(keyID)) } deleteRes := &api.PerformDeleteKeysResponse{}