From c283908cc1f0678ebe1ea27ee2e8d7ac05c5e737 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 4 Feb 2013 02:33:25 +0000 Subject: [PATCH] Send show, status, priority and caps when changing room nickname --- src/xmpp/presence.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index fc7f4293..5d8861ac 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -184,8 +184,19 @@ presence_change_room_nick(const char * const room, const char * const nick) { xmpp_ctx_t *ctx = connection_get_ctx(); xmpp_conn_t *conn = connection_get_conn(); + jabber_presence_t presence_type = jabber_get_presence_type(); + const char *show = stanza_get_presence_string_from_type(presence_type); + char *status = jabber_get_presence_message(); + int pri = accounts_get_priority_for_presence_type(jabber_get_account_name(), + presence_type); + char *full_room_jid = create_fulljid(room, nick); xmpp_stanza_t *presence = stanza_create_room_newnick_presence(ctx, full_room_jid); + stanza_attach_show(ctx, presence, show); + stanza_attach_status(ctx, presence, status); + stanza_attach_priority(ctx, presence, pri); + stanza_attach_caps(ctx, presence); + xmpp_send(conn, presence); xmpp_stanza_release(presence);