Add support to register with a room
`/affiliation register` can now be used to register a nickname with a MUC. Tested with a server without forms. Couldn't find a server which supports forms yet. Implements https://github.com/profanity-im/profanity/issues/1210
This commit is contained in:
@@ -2828,3 +2828,18 @@ stanza_create_approve_voice(xmpp_ctx_t* ctx, const char* const id, const char* c
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
xmpp_stanza_t*
|
||||
stanza_create_muc_register_nick(xmpp_ctx_t* ctx, const char* const id, const char* const jid, const char* const node, DataForm* form)
|
||||
{
|
||||
xmpp_stanza_t* iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id);
|
||||
|
||||
xmpp_stanza_set_to(iq, jid);
|
||||
|
||||
xmpp_stanza_t* x = form_create_submission(form);
|
||||
|
||||
xmpp_stanza_add_child(iq, x);
|
||||
xmpp_stanza_release(x);
|
||||
|
||||
return iq;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user