comparison libpurple/protocols/jabber/buddy.c @ 27508:95c56191d26c

For contacts who advertise Entity Caps, check for XHTML-IM support. Refs #4650. For backward-compatibility (and what I, as someone who knows that Jabber supports rich-text, would expect), continue sending it if the contact is offline (i.e. not on the roster).
author Paul Aurich <paul@darkrain42.org>
date Sun, 12 Jul 2009 04:39:31 +0000
parents b118127843cc
children a12574d982a1
comparison
equal deleted inserted replaced
27507:2a19181b41fa 27508:95c56191d26c
159 JabberBuddyResource *jbr = jabber_buddy_find_resource(jb, resource); 159 JabberBuddyResource *jbr = jabber_buddy_find_resource(jb, resource);
160 if(!jbr) { 160 if(!jbr) {
161 jbr = g_new0(JabberBuddyResource, 1); 161 jbr = g_new0(JabberBuddyResource, 1);
162 jbr->jb = jb; 162 jbr->jb = jb;
163 jbr->name = g_strdup(resource); 163 jbr->name = g_strdup(resource);
164 jbr->capabilities = JABBER_CAP_XHTML; 164 jbr->capabilities = JABBER_CAP_NONE;
165 jbr->tz_off = PURPLE_NO_TZ_OFF; 165 jbr->tz_off = PURPLE_NO_TZ_OFF;
166 jb->resources = g_list_append(jb->resources, jbr); 166 jb->resources = g_list_append(jb->resources, jbr);
167 } 167 }
168 jbr->priority = priority; 168 jbr->priority = priority;
169 jbr->state = state; 169 jbr->state = state;
2242 if (features) 2242 if (features)
2243 node = g_list_find_custom(features, cap, (GCompareFunc)strcmp); 2243 node = g_list_find_custom(features, cap, (GCompareFunc)strcmp);
2244 } 2244 }
2245 } 2245 }
2246 2246
2247 /* TODO: Are these messages actually useful? */
2248 if (node)
2249 purple_debug_info("jabber", "Found cap: %s\n", cap);
2250 else
2251 purple_debug_info("jabber", "Cap %s not found\n", cap);
2252
2253 return (node != NULL); 2247 return (node != NULL);
2254 } 2248 }
2255 2249
2256 gboolean 2250 gboolean
2257 jabber_buddy_has_capability(const JabberBuddy *jb, const gchar *cap) 2251 jabber_buddy_has_capability(const JabberBuddy *jb, const gchar *cap)