| 479 | } |
| 480 | |
| 481 | jsi::Value CommRustModule::logOutSecondaryDevice( |
| 482 | jsi::Runtime &rt, |
| 483 | jsi::String userID, |
| 484 | jsi::String deviceID, |
| 485 | jsi::String accessToken) { |
| 486 | auto userIDRust = jsiStringToRustString(userID, rt); |
| 487 | auto deviceIDRust = jsiStringToRustString(deviceID, rt); |
| 488 | auto accessTokenRust = jsiStringToRustString(accessToken, rt); |
| 489 | |
| 490 | return createPromiseAsJSIValue( |
| 491 | rt, [=, this](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) { |
| 492 | std::string error; |
| 493 | try { |
| 494 | auto currentID = RustPromiseManager::instance.addPromise( |
| 495 | {promise, this->jsInvoker_, innerRt}); |
| 496 | identityLogOutSecondaryDevice( |
| 497 | userIDRust, deviceIDRust, accessTokenRust, currentID); |
| 498 | } catch (const std::exception &e) { |
| 499 | error = e.what(); |
| 500 | }; |
| 501 | if (!error.empty()) { |
| 502 | this->jsInvoker_->invokeAsync( |
| 503 | [error, promise]() { promise->reject(error); }); |
| 504 | } |
| 505 | }); |
| 506 | } |
| 507 | |
| 508 | jsi::Value CommRustModule::getOutboundKeysForUser( |
| 509 | jsi::Runtime &rt, |
nothing calls this directly
no test coverage detected