aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-chat.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 624b1a03f..02d123b54 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -695,13 +695,24 @@ static void
chat_command_join (EmpathyChat *chat,
GStrv strv)
{
+ guint i = 0;
EmpathyChatPriv *priv = GET_PRIV (chat);
- TpConnection *connection;
- connection = empathy_tp_chat_get_connection (priv->tp_chat);
- empathy_dispatcher_join_muc (connection, strv[1],
- chat_command_join_cb,
- chat);
+ GStrv rooms = g_strsplit_set (strv[1], ", ", -1);
+
+ while (rooms[i] != NULL) {
+ /* ignore empty strings */
+ if (EMP_STR_EMPTY (rooms[i])) {
+ TpConnection *connection;
+
+ connection = empathy_tp_chat_get_connection (priv->tp_chat);
+ empathy_dispatcher_join_muc (connection, rooms[i],
+ chat_command_join_cb,
+ chat);
+ }
+ i++;
+ }
+ g_strfreev (rooms);
}
static void