# HG changeset patch
# Node ID 0cecff9dc326daa9d2da79903f9f8cbc193952c8
# Parent  399e2538f319d821a15b60ddcc1af0dbd42edc36
diff --git a/im.pidgin.Pidgin3.yml b/im.pidgin.Pidgin3.yml
--- a/im.pidgin.Pidgin3.yml
+++ b/im.pidgin.Pidgin3.yml
@@ -71,8 +71,8 @@
     sources:
       - type: archive
         archive-type: tar-xz
-        url: https://sourceforge.net/projects/pidgin/files/ibis/0.11.0/ibis-0.11.0.tar.xz/download
-        sha256: 9f2d4a13229ca5848d1cf3a0f56ffdde4f8decea4b6b0101d5c10421a9ba35dc
+        url: https://sourceforge.net/projects/pidgin/files/ibis/0.11.2/ibis-0.11.2.tar.xz/download
+        sha256: 04ac94c2c564e24a24ef76805ca065451aa76cf9c7b2eb46f0b1e4107f5f7205
   - name: xeme
     buildsystem: meson
     config-opts:
diff --git a/protocols/ircv3/meson.build b/protocols/ircv3/meson.build
--- a/protocols/ircv3/meson.build
+++ b/protocols/ircv3/meson.build
@@ -22,7 +22,7 @@
 	subdir_done()
 endif
 
-ibis_dep = dependency('ibis', version : '>= 0.11.1')
+ibis_dep = dependency('ibis', version : '>= 0.11.2')
 
 ircv3_filebase = f'purple-@purple_api_major_version@-ircv3'
 ircv3_filebase = f'purple-@purple_api_major_version@-ircv3'
diff --git a/protocols/ircv3/purpleircv3connection.c b/protocols/ircv3/purpleircv3connection.c
--- a/protocols/ircv3/purpleircv3connection.c
+++ b/protocols/ircv3/purpleircv3connection.c
@@ -31,6 +31,8 @@
 #include "purpleircv3core.h"
 #include "purpleircv3messagehandlers.h"
 
+#define IRCV3_STATUS_CONVERSATION_ID "@ircv3-status@"
+
 enum {
 	PROP_0,
 	PROP_CLIENT,
@@ -177,6 +179,25 @@
 	                                             show_command);
 }
 
+static void
+purple_ircv3_connection_update_status_title(PurpleIRCv3Connection *connection)
+{
+	char *title = NULL;
+	const char *nick = NULL;
+	const char *network = NULL;
+
+	nick = ibis_client_get_active_nick(connection->client);
+
+	network = ibis_client_get_network(connection->client);
+	if(purple_strempty(network)) {
+		network = connection->server_name;
+	}
+
+	title = g_strdup_printf(_("status %s on %s"), nick, network);
+	purple_conversation_set_title(connection->status_conversation, title);
+	g_free(title);
+}
+
 /******************************************************************************
  * Message Handlers
  *****************************************************************************/
@@ -579,6 +600,16 @@
 	                                     IBIS_CAPABILITY_ACCOUNT_TAG);
 }
 
+static void
+purple_ircv3_connection_update_status_title_cb(G_GNUC_UNUSED GObject *obj,
+                                               G_GNUC_UNUSED GParamSpec *pspec,
+                                               gpointer data)
+{
+	PurpleIRCv3Connection *connection = data;
+
+	purple_ircv3_connection_update_status_title(connection);
+}
+
 /******************************************************************************
  * PurpleConnection Implementation
  *****************************************************************************/
@@ -616,6 +647,12 @@
 	g_signal_connect_object(connection->client, "notify::error",
 	                        G_CALLBACK(purple_ircv3_connection_error_cb),
 	                        connection, G_CONNECT_DEFAULT);
+	g_signal_connect_object(connection->client, "notify::active-nick",
+	                        G_CALLBACK(purple_ircv3_connection_update_status_title_cb),
+	                        connection, G_CONNECT_DEFAULT);
+	g_signal_connect_object(connection->client, "notify::network",
+	                        G_CALLBACK(purple_ircv3_connection_update_status_title_cb),
+	                        connection, G_CONNECT_DEFAULT);
 	purple_ircv3_connection_add_message_handlers(connection,
 	                                             connection->client);
 
@@ -734,15 +771,11 @@
 	PurpleConversationManager *conversation_manager = NULL;
 	char **userparts = NULL;
 	const char *username = NULL;
-	char *title = NULL;
 
 	G_OBJECT_CLASS(purple_ircv3_connection_parent_class)->constructed(obj);
 
 	account = purple_connection_get_account(PURPLE_CONNECTION(connection));
 
-	title = g_strdup_printf(_("status for %s"),
-	                        purple_account_get_username(account));
-
 	/* Split the username into nick and server and store the values. */
 	username = purple_account_get_username(account);
 	userparts = g_strsplit(username, "@", 2);
@@ -755,15 +788,14 @@
 	conversation_manager = purple_conversation_manager_get_default();
 	connection->status_conversation = purple_conversation_manager_find_with_id(conversation_manager,
 	                                                                           account,
-	                                                                           connection->server_name);
+	                                                                           IRCV3_STATUS_CONVERSATION_ID);
 
 	if(!PURPLE_IS_CONVERSATION(connection->status_conversation)) {
 		/* Create our status conversation. */
 		connection->status_conversation = g_object_new(
 			PURPLE_TYPE_CONVERSATION,
 			"account", account,
-			"id", connection->server_name,
-			"title", title,
+			"id", IRCV3_STATUS_CONVERSATION_ID,
 			"online", TRUE,
 			NULL);
 
@@ -776,8 +808,6 @@
 		purple_conversation_set_online(connection->status_conversation, TRUE);
 		purple_conversation_set_error(connection->status_conversation, NULL);
 	}
-
-	g_clear_pointer(&title, g_free);
 }
 
 static void
diff --git a/subprojects/ibis.wrap b/subprojects/ibis.wrap
--- a/subprojects/ibis.wrap
+++ b/subprojects/ibis.wrap
@@ -1,5 +1,5 @@
 [wrap-file]
-directory = ibis-0.11.1
-source_url = https://sourceforge.net/projects/pidgin/files/ibis/0.11.1/ibis-0.11.1.tar.xz
-source_filename = ibis-0.11.1.tar.xz
-source_hash = c3efb8d77f893fea9f7290f8884e9d00f552e84331ccd5d2b686fe6ce16fc3b7
+directory = ibis-0.11.2
+source_url = https://sourceforge.net/projects/pidgin/files/ibis/0.11.2/ibis-0.11.2.tar.xz
+source_filename = ibis-0.11.2.tar.xz
+source_hash = 04ac94c2c564e24a24ef76805ca065451aa76cf9c7b2eb46f0b1e4107f5f7205
