mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 22:46:21 +00:00
Implemented setting affiliation and listing affiliations
This commit is contained in:
@@ -276,21 +276,22 @@ _iq_room_config_cancel(const char * const room_jid)
|
||||
}
|
||||
|
||||
static void
|
||||
_iq_room_owner_add(const char * const room, const char * const jid, const char * const reason)
|
||||
_iq_room_affiliation_list(const char * const room, const char * const affiliation)
|
||||
{
|
||||
xmpp_conn_t * const conn = connection_get_conn();
|
||||
xmpp_ctx_t * const ctx = connection_get_ctx();
|
||||
xmpp_stanza_t *iq = stanza_create_room_owner_add_iq(ctx, room, jid, reason);
|
||||
xmpp_stanza_t *iq = stanza_create_room_affiliation_list_iq(ctx, room, affiliation);
|
||||
xmpp_send(conn, iq);
|
||||
xmpp_stanza_release(iq);
|
||||
}
|
||||
|
||||
static void
|
||||
_iq_room_owner_remove(const char * const room, const char * const jid, const char * const reason)
|
||||
_iq_room_affiliation_set(const char * const room, const char * const jid, const char * const affiliation,
|
||||
const char * const reason)
|
||||
{
|
||||
xmpp_conn_t * const conn = connection_get_conn();
|
||||
xmpp_ctx_t * const ctx = connection_get_ctx();
|
||||
xmpp_stanza_t *iq = stanza_create_room_owner_remove_iq(ctx, room, jid, reason);
|
||||
xmpp_stanza_t *iq = stanza_create_room_affiliation_set_iq(ctx, room, jid, affiliation, reason);
|
||||
xmpp_send(conn, iq);
|
||||
xmpp_stanza_release(iq);
|
||||
}
|
||||
@@ -997,6 +998,6 @@ iq_init_module(void)
|
||||
iq_submit_room_config = _iq_submit_room_config;
|
||||
iq_send_caps_request = _iq_send_caps_request;
|
||||
iq_room_info_request = _iq_room_info_request;
|
||||
iq_room_owner_add = _iq_room_owner_add;
|
||||
iq_room_owner_remove = _iq_room_owner_remove;
|
||||
iq_room_affiliation_set = _iq_room_affiliation_set;
|
||||
iq_room_affiliation_list = _iq_room_affiliation_list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user