mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
jabber: added MUC namespace to jabber_join
This commit is contained in:
parent
9ea9222158
commit
5fe12bbd15
12
src/jabber.c
12
src/jabber.c
@ -253,14 +253,20 @@ jabber_subscribe(const char * const recipient)
|
|||||||
void
|
void
|
||||||
jabber_join(const char * const room_jid, const char * const nick)
|
jabber_join(const char * const room_jid, const char * const nick)
|
||||||
{
|
{
|
||||||
xmpp_stanza_t *presence = xmpp_stanza_new(jabber_conn.ctx);
|
|
||||||
xmpp_stanza_set_name(presence, "presence");
|
|
||||||
|
|
||||||
GString *to = g_string_new(room_jid);
|
GString *to = g_string_new(room_jid);
|
||||||
g_string_append(to, "/");
|
g_string_append(to, "/");
|
||||||
g_string_append(to, nick);
|
g_string_append(to, nick);
|
||||||
|
|
||||||
|
xmpp_stanza_t *presence = xmpp_stanza_new(jabber_conn.ctx);
|
||||||
|
xmpp_stanza_set_name(presence, "presence");
|
||||||
xmpp_stanza_set_attribute(presence, "to", to->str);
|
xmpp_stanza_set_attribute(presence, "to", to->str);
|
||||||
|
|
||||||
|
xmpp_stanza_t *x = xmpp_stanza_new(jabber_conn.ctx);
|
||||||
|
xmpp_stanza_set_name(x, "x");
|
||||||
|
xmpp_stanza_set_ns(x, "http://jabber.org/protocol/muc");
|
||||||
|
|
||||||
|
xmpp_stanza_add_child(presence, x);
|
||||||
|
|
||||||
xmpp_send(jabber_conn.conn, presence);
|
xmpp_send(jabber_conn.conn, presence);
|
||||||
xmpp_stanza_release(presence);
|
xmpp_stanza_release(presence);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user