[Telepathy-commits] [telepathy-gabble/master] Rephrase comment about why we're not strictly following XEP-0153, to avoid having #if 0'd code

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:52:12 PDT 2008


20080507153158-53eee-aec58f9a69b519eaf353111da812cd4d505342e5.gz
---
 src/presence-cache.c |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/presence-cache.c b/src/presence-cache.c
index aa5cd57..b645b14 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -565,19 +565,20 @@ _grab_avatar_sha1 (GabblePresenceCache *cache,
 
   if (NULL == x_node)
     {
-#if 0
-      if (handle == priv->conn->parent.self_handle)
-        {
-          /* One of my other resources does not support XEP-0153. As per that
-           * XEP, I MUST stop advertising the image hash, at least until all
-           * instances of non-conforming resources have gone offline.
-           * However, we're going to ignore this requirement and hope that
-           * non-conforming clients won't alter the <PHOTO>, which should
-           * in practice be true.
-           */
-          presence->avatar_sha1 = NULL;
-        }
-#endif
+      /* If (handle == priv->conn->parent.self_handle), then this means
+       * that one of our other resources does not support XEP-0153. According
+       * to that XEP, we MUST now stop advertising the image hash, at least
+       * until all instances of non-conforming resources have gone offline, by
+       * setting presence->avatar_sha1 to NULL.
+       *
+       * However, this would mean that logging in (e.g.) with an old version
+       * of Gabble would disable avatars in this newer version, which is
+       * quite a silly failure mode. As a result, we ignore this
+       * requirement and hope that non-conforming clients won't alter the
+       * <PHOTO>, which should in practice be true.
+       *
+       * If handle != self_handle, then in any case we want to ignore this
+       * message for vCard purposes. */
       return;
     }
 
-- 
1.5.6.3




More information about the Telepathy-commits mailing list