diff options
Diffstat (limited to 'src/xmpp/stanza.c')
-rw-r--r-- | src/xmpp/stanza.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c index 68ace83c..7bd648f7 100644 --- a/src/xmpp/stanza.c +++ b/src/xmpp/stanza.c @@ -966,6 +966,25 @@ stanza_create_disco_items_iq(xmpp_ctx_t *ctx, const char * const id, } xmpp_stanza_t * +stanza_create_last_activity_iq(xmpp_ctx_t *ctx, const char * const id, const char * const to) +{ + xmpp_stanza_t *iq = xmpp_stanza_new(ctx); + xmpp_stanza_set_name(iq, STANZA_NAME_IQ); + xmpp_stanza_set_type(iq, STANZA_TYPE_GET); + xmpp_stanza_set_attribute(iq, STANZA_ATTR_TO, to); + xmpp_stanza_set_id(iq, id); + + xmpp_stanza_t *query = xmpp_stanza_new(ctx); + xmpp_stanza_set_name(query, STANZA_NAME_QUERY); + xmpp_stanza_set_ns(query, "jabber:iq:last"); + + xmpp_stanza_add_child(iq, query); + xmpp_stanza_release(query); + + return iq; +} + +xmpp_stanza_t * stanza_create_room_config_submit_iq(xmpp_ctx_t *ctx, const char * const room, DataForm *form) { xmpp_stanza_t *iq = xmpp_stanza_new(ctx); |