about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-04 02:33:25 +0000
committerJames Booth <boothj5@gmail.com>2013-02-04 02:33:25 +0000
commitc283908cc1f0678ebe1ea27ee2e8d7ac05c5e737 (patch)
treecae6ba027ddbe88eb400c263bb85d56c5d2522b0
parentb94dc5ecdd2bc10125d06ceeb6d9d8fd70ab34c5 (diff)
downloadprofani-tty-c283908cc1f0678ebe1ea27ee2e8d7ac05c5e737.tar.gz
Send show, status, priority and caps when changing room nickname
-rw-r--r--src/xmpp/presence.c11
1 files changed, 11 insertions, 0 deletions
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);
 
246cecc18bdf'>^
4d6b5173 ^
6a0f71b9 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16