From 254293bc2cbfb15c4ffa392c6b896131cca6e290 Mon Sep 17 00:00:00 2001 From: mjentsch Date: Fri, 24 Jul 2015 14:27:20 +0200 Subject: [PATCH] Display new chats after creation --- telegram-base.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/telegram-base.c b/telegram-base.c index 85a011c..9c87a1b 100644 --- a/telegram-base.c +++ b/telegram-base.c @@ -40,6 +40,7 @@ #include "tgp-2prpl.h" #include "tgp-structs.h" #include "tgp-utils.h" +#include "tgp-chat.h" #include "lodepng/lodepng.h" #define _(m) m @@ -619,6 +620,12 @@ void create_group_chat_done_cb (struct tgl_state *TLS, void *title, int success) // alert purple_notify_error (_telegram_protocol, "Creating Group Chat Failed", "Creating Group Chat Failed", "Check the error log for further information."); + } else { + tgl_peer_t *t = tgl_peer_get_by_name(TLS, title); + if (t) { + connection_data *conn = TLS->ev_base; + chat_show (conn->gc, tgl_get_peer_id(t->id)); + } } g_free (title); }