Skip to content

Commit

Permalink
Avatars: treat empty pubsub items list as item-not-found error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jun 20, 2024
1 parent 5593ef5 commit 257a7e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vcardfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "profiles.h"
#include "psiaccount.h"

#include "xmpp/xmpp-im/xmpp_caps.h"
// #include "xmpp/xmpp-im/xmpp_caps.h"
#include "xmpp/xmpp-im/xmpp_pubsubitem.h"
#include "xmpp/xmpp-im/xmpp_serverinfomanager.h"
#include "xmpp/xmpp-im/xmpp_vcard4.h"
Expand Down Expand Up @@ -414,6 +414,11 @@ void VCardRequest::executePubSub(PsiAccount *pa)
if (task->success()) {
if (!task->items().empty()) {
d->vcard = VCard4::VCard(task->items().last().payload());
} else {
if (ppa) {
executeVCardTemp(ppa);
return;
}
}
} else if (!task->error().isCancel()
|| task->error().condition != XMPP::Stanza::Error::ErrorCond::ItemNotFound) {
Expand Down

0 comments on commit 257a7e8

Please sign in to comment.