/soc/2015/koosha/main: 9681c39416ec: XEP-0308: update sending si...

Koosha Khajehmoogahi koosha at posteo.de
Fri Jul 10 11:51:31 EDT 2015


Changeset: 9681c39416ec1ea80704661cbf1e0c5f7d66bde4
Author:	 Koosha Khajehmoogahi <koosha at posteo.de>
Date:	 2015-07-10 17:25 +0200
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/koosha/main/rev/9681c39416ec

Description:

XEP-0308: update sending side conversation window in Pidgin

diffstat:

 libpurple/protocols/jabber/jabber.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (23 lines):

diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -3205,6 +3205,7 @@ jabber_cmd_replace(PurpleConversation *c
 	PurpleAccount *account;
 	PurpleBuddy *buddy;
 	PurpleConnection *conn;
+	PurpleMessageFlags flags = 0;
 	PurpleXmlNode *body, *replace, *msg;
 	JabberStream *js;
 	JabberBuddy *jb;
@@ -3257,6 +3258,11 @@ jabber_cmd_replace(PurpleConversation *c
 	jabber_send(js, msg);
 	purple_xmlnode_free(msg);
 
+	/* TODO: update the last message in history as well */
+	flags |= PURPLE_MESSAGE_SEND;
+	flags |= PURPLE_MESSAGE_REPLACE_LAST;
+	purple_conversation_write_system_message(conv, args[0], flags);
+
 	purple_signal_emit(purple_connection_get_protocol(conn), "jabber-replacing-message",
 			conn, last_id, args[0]);
 



More information about the Commits mailing list