mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 05:36:21 +00:00
Added retrieval of caps string from presence
This commit is contained in:
16
src/stanza.c
16
src/stanza.c
@@ -391,3 +391,19 @@ stanza_get_idle_time(xmpp_stanza_t * const stanza)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
xmpp_stanza_t *
|
||||
stanza_get_caps(xmpp_stanza_t * const stanza)
|
||||
{
|
||||
xmpp_stanza_t *caps = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_C);
|
||||
|
||||
if (caps == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (strcmp(xmpp_stanza_get_ns(caps), STANZA_NS_CAPS) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user