aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-chat-window.c
diff options
context:
space:
mode:
authorChandni Verma <chandniverma2112@gmail.com>2011-02-28 07:37:31 +0800
committerChandni Verma <chandniverma2112@gmail.com>2011-05-09 07:31:28 +0800
commit5324df2fe08ece901d34271afc56ac41e5100fbf (patch)
tree343bcc12c39664ba6b792b5eb2c3771fa556f98c /src/empathy-chat-window.c
parent9dbdbe692285c70d2b2bf713f2b21b156a87055c (diff)
downloadgsoc2013-empathy-5324df2fe08ece901d34271afc56ac41e5100fbf.tar
gsoc2013-empathy-5324df2fe08ece901d34271afc56ac41e5100fbf.tar.gz
gsoc2013-empathy-5324df2fe08ece901d34271afc56ac41e5100fbf.tar.bz2
gsoc2013-empathy-5324df2fe08ece901d34271afc56ac41e5100fbf.tar.lz
gsoc2013-empathy-5324df2fe08ece901d34271afc56ac41e5100fbf.tar.xz
gsoc2013-empathy-5324df2fe08ece901d34271afc56ac41e5100fbf.tar.zst
gsoc2013-empathy-5324df2fe08ece901d34271afc56ac41e5100fbf.zip
Send full message for the default chat parted on part command
Diffstat (limited to 'src/empathy-chat-window.c')
-rw-r--r--src/empathy-chat-window.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 8da1cc2f2..b7bb6c874 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1499,7 +1499,20 @@ chat_window_command_part (EmpathyChat *chat,
empathy_tp_chat_leave (empathy_chat_get_tp_chat (chat_to_be_parted),
strv[2]);
} else {
- empathy_tp_chat_leave (empathy_chat_get_tp_chat (chat), strv[1]);
+ gchar *message;
+
+ /* Going by the syntax of PART command:
+ *
+ * /PART [<chatroom-ID>] [<reason>]
+ *
+ * Chatroom-ID is not a must to specify a reason.
+ * If strv[1] (chatroom-ID) is not a valid identifier for a connected
+ * MUC then the current chatroom should be parted and srtv[1] should
+ * be treated as part of the optional part-message. */
+ message = g_strconcat (strv[1], " ", strv[2], NULL);
+ empathy_tp_chat_leave (empathy_chat_get_tp_chat (chat), message);
+
+ g_free (message);
}
}