aboutsummaryrefslogtreecommitdiff
path: root/src/omemo/QXmppOmemoManager_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/omemo/QXmppOmemoManager_p.cpp')
-rw-r--r--src/omemo/QXmppOmemoManager_p.cpp15
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.