initial support of autojoin for MUC
This commit is contained in:
@@ -33,6 +33,63 @@
|
||||
|
||||
static int _field_compare(FormField *f1, FormField *f2);
|
||||
|
||||
#if 0
|
||||
xmpp_stanza_t *
|
||||
stanza_create_storage_bookmarks(xmpp_ctx_t *ctx)
|
||||
{
|
||||
xmpp_stanza_t *iq, *pubsub, *items;
|
||||
|
||||
/* TODO: check pointers for NULL */
|
||||
iq = xmpp_stanza_new(ctx);
|
||||
pubsub = xmpp_stanza_new(ctx);
|
||||
items = xmpp_stanza_new(ctx);
|
||||
|
||||
xmpp_stanza_set_name(iq, STANZA_NAME_IQ);
|
||||
xmpp_stanza_set_type(iq, STANZA_TYPE_GET);
|
||||
|
||||
xmpp_stanza_set_name(pubsub, STANZA_NAME_PUBSUB);
|
||||
xmpp_stanza_set_ns(pubsub, STANZA_NS_PUBSUB);
|
||||
|
||||
xmpp_stanza_set_name(items, STANZA_NAME_ITEMS);
|
||||
xmpp_stanza_set_attribute(items, "node", "storage:bookmarks");
|
||||
|
||||
xmpp_stanza_add_child(pubsub, items);
|
||||
xmpp_stanza_add_child(iq, pubsub);
|
||||
xmpp_stanza_release(items);
|
||||
xmpp_stanza_release(pubsub);
|
||||
|
||||
return iq;
|
||||
}
|
||||
#endif
|
||||
|
||||
xmpp_stanza_t *
|
||||
stanza_create_storage_bookmarks(xmpp_ctx_t *ctx)
|
||||
{
|
||||
xmpp_stanza_t *iq, *query, *storage;
|
||||
|
||||
/* TODO: check pointers for NULL */
|
||||
iq = xmpp_stanza_new(ctx);
|
||||
query = xmpp_stanza_new(ctx);
|
||||
storage = xmpp_stanza_new(ctx);
|
||||
|
||||
xmpp_stanza_set_name(iq, STANZA_NAME_IQ);
|
||||
xmpp_stanza_set_type(iq, STANZA_TYPE_GET);
|
||||
xmpp_stanza_set_ns(iq, "jabber:client");
|
||||
|
||||
xmpp_stanza_set_name(query, STANZA_NAME_QUERY);
|
||||
xmpp_stanza_set_ns(query, "jabber:iq:private");
|
||||
|
||||
xmpp_stanza_set_name(storage, STANZA_NAME_STORAGE);
|
||||
xmpp_stanza_set_ns(storage, "storage:bookmarks");
|
||||
|
||||
xmpp_stanza_add_child(query, storage);
|
||||
xmpp_stanza_add_child(iq, query);
|
||||
xmpp_stanza_release(storage);
|
||||
xmpp_stanza_release(query);
|
||||
|
||||
return iq;
|
||||
}
|
||||
|
||||
xmpp_stanza_t *
|
||||
stanza_create_chat_state(xmpp_ctx_t *ctx, const char * const recipient,
|
||||
const char * const state)
|
||||
|
||||
Reference in New Issue
Block a user