mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Skip empty requests for cross-signing keys when user only has one device.
Cause: Request button pressed in user settings. Result: Request body is jsNull; sendToDevice requires jsObject.
This commit is contained in:
parent
7f9af9016d
commit
0253aa59c7
1 changed files with 3 additions and 0 deletions
|
@ -1613,6 +1613,9 @@ request_cross_signing_keys()
|
||||||
body[local_user][dev] = secretRequest;
|
body[local_user][dev] = secretRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (body.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
http::client()->send_to_device<mtx::events::msg::SecretRequest>(
|
http::client()->send_to_device<mtx::events::msg::SecretRequest>(
|
||||||
http::client()->generate_txn_id(),
|
http::client()->generate_txn_id(),
|
||||||
body,
|
body,
|
||||||
|
|
Loading…
Reference in a new issue