Added check for caps in stanza

This commit is contained in:
James Booth
2013-01-20 21:01:30 +00:00
parent eeafd62716
commit dfeb884e9b
3 changed files with 36 additions and 12 deletions

View File

@@ -415,6 +415,22 @@ stanza_get_idle_time(xmpp_stanza_t * const stanza)
}
}
gboolean
stanza_contains_caps(xmpp_stanza_t * const stanza)
{
xmpp_stanza_t *caps = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_C);
if (caps == NULL) {
return FALSE;
}
if (strcmp(xmpp_stanza_get_ns(caps), STANZA_NS_CAPS) != 0) {
return FALSE;
}
return TRUE;
}
char *
stanza_get_caps_str(xmpp_stanza_t * const stanza)
{