fix device deletion (#3614)
Some checks failed
Dendrite / WASM build test (push) Has been cancelled
Dendrite / Linting (push) Has been cancelled
Dendrite / Unit tests (push) Has been cancelled
Dendrite / Build for Linux (push) Has been cancelled
Dendrite / Build for Windows (push) Has been cancelled
Dendrite / Initial tests passed (push) Has been cancelled
Dendrite / Integration tests (push) Has been cancelled
Dendrite / Upgrade tests (push) Has been cancelled
Dendrite / Upgrade tests from HEAD-2 (push) Has been cancelled
Dendrite / Sytest (SQLite Cgo) (push) Has been cancelled
Dendrite / Sytest (PostgreSQL) (push) Has been cancelled
Dendrite / Sytest (SQLite native) (push) Has been cancelled
Dendrite / Complement (PostgreSQL) (push) Has been cancelled
Dendrite / Complement (SQLite native) (push) Has been cancelled
Dendrite / Complement (SQLite Cgo) (push) Has been cancelled
Dendrite / Integration tests passed (push) Has been cancelled
Dendrite / Update Docker images (push) Has been cancelled

### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [ ] 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>`
This commit is contained in:
robinsdan 2025-07-23 13:53:30 +08:00 committed by GitHub
parent 331a6f221b
commit 8d2da78744
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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{}