WIP: Added last activity request and response

This commit is contained in:
James Booth
2015-09-29 00:01:38 +01:00
parent a12624ea75
commit 26d160cae8
11 changed files with 211 additions and 2 deletions

View File

@@ -965,6 +965,25 @@ stanza_create_disco_items_iq(xmpp_ctx_t *ctx, const char * const id,
return iq;
}
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)
{