mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-29 22:26:21 +00:00
Added password to direct invites
This commit is contained in:
@@ -414,7 +414,7 @@ stanza_create_roster_set(xmpp_ctx_t *ctx, const char * const id,
|
||||
|
||||
xmpp_stanza_t *
|
||||
stanza_create_invite(xmpp_ctx_t *ctx, const char * const room,
|
||||
const char * const contact, const char * const reason)
|
||||
const char * const contact, const char * const reason, const char * const password)
|
||||
{
|
||||
xmpp_stanza_t *message, *x;
|
||||
|
||||
@@ -430,9 +430,12 @@ stanza_create_invite(xmpp_ctx_t *ctx, const char * const room,
|
||||
xmpp_stanza_set_ns(x, STANZA_NS_CONFERENCE);
|
||||
|
||||
xmpp_stanza_set_attribute(x, STANZA_ATTR_JID, room);
|
||||
if (reason != NULL) {
|
||||
if (reason) {
|
||||
xmpp_stanza_set_attribute(x, STANZA_ATTR_REASON, reason);
|
||||
}
|
||||
if (password) {
|
||||
xmpp_stanza_set_attribute(x, STANZA_ATTR_PASSWORD, password);
|
||||
}
|
||||
|
||||
xmpp_stanza_add_child(message, x);
|
||||
xmpp_stanza_release(x);
|
||||
|
||||
Reference in New Issue
Block a user