From 6b2ccc99e155ab3dba1febddf993d94cd60c6a41 Mon Sep 17 00:00:00 2001 From: Gary Kramlich Date: Fri, 18 Nov 2022 00:56:22 -0600 Subject: Inline purple_serv_get_info and purple_serv_set_info Testing Done: Compiled Reviewed at https://reviews.imfreedom.org/r/2071/ --- finch/gntblist.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'finch') diff --git a/finch/gntblist.c b/finch/gntblist.c index e6b6c0f300..488f34d0e3 100644 --- a/finch/gntblist.c +++ b/finch/gntblist.c @@ -1105,13 +1105,24 @@ create_group_menu(GntMenu *menu, PurpleGroup *group) gpointer finch_retrieve_user_info(PurpleConnection *conn, const char *name) { - PurpleNotifyUserInfo *info = purple_notify_user_info_new(); + PurpleProtocol *protocol = NULL; + PurpleNotifyUserInfo *info = NULL; gpointer uihandle; + + protocol = purple_connection_get_protocol(conn); + + if(!PURPLE_IS_PROTOCOL_SERVER(protocol)) { + return; + } + + purple_protocol_server_get_info(PURPLE_PROTOCOL_SERVER(protocol), conn, + name); + + info = purple_notify_user_info_new(); purple_notify_user_info_add_pair_plaintext(info, _("Information"), _("Retrieving...")); uihandle = purple_notify_userinfo(conn, name, info, NULL, NULL); purple_notify_user_info_destroy(info); - purple_serv_get_info(conn, name); return uihandle; } -- cgit v1.2.1