If a message as given when a user join/parts a conversation use it explicitly

Thu, 17 Oct 2024 23:58:52 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 17 Oct 2024 23:58:52 -0500
changeset 43018
78cd7c6e8c40
parent 43017
09661a988eab
child 43019
7621ef6ea06a

If a message as given when a user join/parts a conversation use it explicitly

This allows protocols to have better control over what is display which allows
them to keep in their nomenclature. For example, IRC users expect to be able to
see the difference between PART and QUIT messages.

Testing Done:
Joined my local ergo and verified that the quit message from another client was the only text for the event.

Reviewed at https://reviews.imfreedom.org/r/3595/

libpurple/purpleconversation.c file | annotate | diff | comparison | revisions
--- a/libpurple/purpleconversation.c	Thu Oct 17 23:57:22 2024 -0500
+++ b/libpurple/purpleconversation.c	Thu Oct 17 23:58:52 2024 -0500
@@ -366,9 +366,7 @@
 		contents = g_strdup_printf(_("%s has joined the conversation"),
 		                           purple_conversation_member_get_name_for_display(member));
 	} else {
-		contents = g_strdup_printf(_("%s has joined the conversation: %s"),
-		                           purple_conversation_member_get_name_for_display(member),
-		                           join_message);
+		contents = g_strdup(join_message);
 	}
 
 	message = g_object_new(
@@ -401,9 +399,7 @@
 		contents = g_strdup_printf(_("%s has left the conversation"),
 		                           purple_conversation_member_get_name_for_display(member));
 	} else {
-		contents = g_strdup_printf(_("%s has left the conversation: %s"),
-		                           purple_conversation_member_get_name_for_display(member),
-		                           part_message);
+		contents = g_strdup(part_message);
 	}
 
 	message = g_object_new(

mercurial