diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-04-08 21:12:41 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-04-08 21:12:41 +0200 |
commit | 0df63b1197b49cd036d09b4d2493eed8e3d598a4 (patch) | |
tree | c00ae18c26e377482d1cf7dd1463ec3ae37a94bb /src | |
parent | a9a5308cf03fcd25492317b844a59019eacfac13 (diff) |
Pairing: use empty record item for reject message
Diffstat (limited to 'src')
-rw-r--r-- | src/pairing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pairing.cpp b/src/pairing.cpp index c22a7af..d2d71f5 100644 --- a/src/pairing.cpp +++ b/src/pairing.cpp @@ -165,7 +165,7 @@ void PairingServiceBase::handle(Context & ctx) state->phase = StatePhase::PeerRequestConfirm; } - else if (auto reject = rec->item("reject").asText()) { + else if (rec->item("reject")) { if (state->phase < StatePhase::PairingDone) { state->phase = StatePhase::PairingFailed; ctx.afterCommit([&]() { @@ -293,7 +293,7 @@ void PairingServiceBase::waitForConfirmation(Peer peer, weak_ptr<State> wstate, } } else { if (state->phase != StatePhase::PairingFailed) { - peer.send(uuid(), Object(Record({{ "reject", string() }}))); + peer.send(uuid(), Object(Record({{ "reject", Record::Item::Empty {} }}))); state->phase = StatePhase::PairingFailed; state->outcome.set_value(Outcome::UserRejected); } |