libpurple/account.c

changeset 41441
e114ed471a1e
parent 41438
86beaec0fa35
child 41444
d8e0a25a57ac
--- a/libpurple/account.c	Mon Jul 04 20:29:32 2022 -0500
+++ b/libpurple/account.c	Mon Jul 04 23:24:35 2022 -0500
@@ -541,9 +541,22 @@
 	}
 
 	if(new_err != NULL) {
+		PurpleProtocol *protocol = NULL;
+
 		priv->error_notification =
 			purple_notification_new(PURPLE_NOTIFICATION_TYPE_CONNECTION_ERROR,
 			                        account, new_err, NULL);
+
+		protocol = purple_account_get_protocol(account);
+		if(PURPLE_IS_PROTOCOL(protocol)) {
+			const gchar *icon_name = purple_protocol_get_icon_name(protocol);
+
+			if(icon_name != NULL) {
+				purple_notification_set_icon_name(priv->error_notification,
+				                                  icon_name);
+			}
+		}
+
 		purple_notification_manager_add(manager, priv->error_notification);
 	}
 

mercurial