diff options
author | James Booth <boothj5@gmail.com> | 2013-01-20 21:01:30 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-01-20 21:01:30 +0000 |
commit | dfeb884e9b6114b765adae9104e68d60ef5444ab (patch) | |
tree | 34aa88c86dbac8604428bd2a8eca2f07a8ced000 /src/stanza.c | |
parent | eeafd627160ed7b52dcada511be10aebaa388392 (diff) | |
download | profani-tty-dfeb884e9b6114b765adae9104e68d60ef5444ab.tar.gz |
Added check for caps in stanza
Diffstat (limited to 'src/stanza.c')
-rw-r--r-- | src/stanza.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/stanza.c b/src/stanza.c index e27aa40d..3abc0abd 100644 --- a/src/stanza.c +++ b/src/stanza.c @@ -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) { |