From 795ae00acfde831e5baa344f310ea7bc14c28e64 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 18 Dec 2019 13:52:48 +0100 Subject: [PATCH] xep-0084: So far we removed the avatar feature only after a succesful retrive in avatar_request_item_by_id() before we are going to retrieve the actual image. We should remove it at every `/avatar barejid` call too so in case one retrieval was unsucessful that we can call it again. So far it seems like there is no other way to trigger getting the nodes except announcing that we support the avatar feature. --- src/xmpp/avatar.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xmpp/avatar.c b/src/xmpp/avatar.c index a1eca839..a968780c 100644 --- a/src/xmpp/avatar.c +++ b/src/xmpp/avatar.c @@ -65,9 +65,13 @@ avatar_pep_subscribe(void) bool avatar_get_by_nick(const char* nick) { + caps_remove_feature(XMPP_FEATURE_USER_AVATAR_METADATA_NOTIFY); free(looking_for); + looking_for = strdup(nick); + caps_add_feature(XMPP_FEATURE_USER_AVATAR_METADATA_NOTIFY); + return TRUE; }