about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-12-18 13:52:48 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-12-18 13:52:48 +0100
commit795ae00acfde831e5baa344f310ea7bc14c28e64 (patch)
tree28cdf8d169c9fbedc0b24c1a2b246e08bc6761c2
parent64a86a17855dd0b12cea73e3b0aa3efca561f783 (diff)
downloadprofani-tty-795ae00acfde831e5baa344f310ea7bc14c28e64.tar.gz
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.
-rw-r--r--src/xmpp/avatar.c4
1 files changed, 4 insertions, 0 deletions
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;
 }