diff options
| author | Linus Jahn <lnj@kaidan.im> | 2023-02-23 12:46:34 +0100 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2023-02-23 12:46:34 +0100 |
| commit | e8f4e4b6ad97227f2f248014e0f0d58a51305e7d (patch) | |
| tree | 992616e7483c177b9e59344ec4ed33c0d6d6cc99 /src/omemo/QXmppOmemoManager_p.cpp | |
| parent | 450a08ff7f6c7889e2fc745666eec02bafd7998f (diff) | |
| parent | a06db8e3469a0c7acd8f5e6bc6502ad16f1d59b8 (diff) | |
Merge branch '1.5'
Diffstat (limited to 'src/omemo/QXmppOmemoManager_p.cpp')
| -rw-r--r-- | src/omemo/QXmppOmemoManager_p.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/omemo/QXmppOmemoManager_p.cpp b/src/omemo/QXmppOmemoManager_p.cpp index ca625322..2e08da04 100644 --- a/src/omemo/QXmppOmemoManager_p.cpp +++ b/src/omemo/QXmppOmemoManager_p.cpp @@ -629,14 +629,17 @@ QXmppTask<bool> ManagerPrivate::setUpDeviceId() // 2. There is an empty PubSub node for device bundles: XEP-0030 states that a server must // respond with a node without included items. auto error = std::get_if<QXmppError>(&result); - if (auto stanzaErr = error->value<QXmppStanza::Error>()) { - // allow Cancel|ItemNotFound here - if (!(stanzaErr->type() == Error::Cancel && stanzaErr->condition() == Error::ItemNotFound)) { - warning("Existing / Published device IDs could not be retrieved: " % errorToString(*error)); + if (error) { + if (auto stanzaErr = error->value<QXmppStanza::Error>()) { + // allow Cancel|ItemNotFound here + if (!(stanzaErr->type() == Error::Cancel && stanzaErr->condition() == Error::ItemNotFound)) { + warning("Existing / Published device IDs could not be retrieved: " % errorToString(*error)); + return false; + } + // do not return here + } else { return false; } - } else { - return false; } // The first generated device ID can be used if no device bundle node exists. |
