adium.1-4: f15ef8ae: Set the 'not typing' state prior to call...

evands at pidgin.im evands at pidgin.im
Sun Feb 20 20:37:08 EST 2011


----------------------------------------------------------------------
Revision: f15ef8aec853f0c996199d27a4497b4c90a118ec
Parent:   471aa5f04627823959bd9accda5d5e5630f119d5
Author:   evands at pidgin.im
Date:     02/20/11 20:17:53
Branch:   im.pidgin.adium.1-4
URL: http://d.pidgin.im/viewmtn/revision/info/f15ef8aec853f0c996199d27a4497b4c90a118ec

Changelog: 

Set the 'not typing' state prior to calling the ui_ops write_im (or using the default write func). If the ui chooses to destroy the conversation in response to the message (as Adium does when automatically handling certain messages, e.g. an IRC nicksev password request which it serves from the keychain), the 'im' or underlying conversation may not be valid after the ui_op is called.

Changes against parent 471aa5f04627823959bd9accda5d5e5630f119d5

  patched  libpurple/conversation.c

-------------- next part --------------
============================================================
--- libpurple/conversation.c	4fa180b953a522b8333ba09ee8231af81fe2c81c
+++ libpurple/conversation.c	fae85594512ae6b0c2da0af82bf2bd6916fdf53f
@@ -1218,15 +1218,15 @@ purple_conv_im_write(PurpleConvIm *im, c
 
 	c = purple_conv_im_get_conversation(im);
 
+    if ((flags & PURPLE_MESSAGE_RECV) == PURPLE_MESSAGE_RECV) {
+		purple_conv_im_set_typing_state(im, PURPLE_NOT_TYPING);
+	}
+
 	/* Pass this on to either the ops structure or the default write func. */
 	if (c->ui_ops != NULL && c->ui_ops->write_im != NULL)
 		c->ui_ops->write_im(c, who, message, flags, mtime);
 	else
 		purple_conversation_write(c, who, message, flags, mtime);
-
-	if ((flags & PURPLE_MESSAGE_RECV) == PURPLE_MESSAGE_RECV) {
-		purple_conv_im_set_typing_state(im, PURPLE_NOT_TYPING);
-	}
 }
 
 gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what)


More information about the Commits mailing list