changeset 2124:a1922ad52304

[gaim-migrate @ 2134] don't display it if it didn't go through committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 06 Aug 2001 17:54:50 +0000
parents 56c4382f2909
children af59d854de29
files src/conversation.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Mon Aug 06 17:50:46 2001 +0000
+++ b/src/conversation.c	Mon Aug 06 17:54:50 2001 +0000
@@ -849,8 +849,6 @@
 	if (!c->is_chat) {
 		char *buffy;
 
-		write_to_conv(c, buf, WFLAG_SEND, NULL, time((time_t)NULL));
-
 		buffy = g_strdup(buf);
 		plugin_event(event_im_displayed_sent, c->gc, c->name, &buffy, 0);
 		if (buffy) {
@@ -859,8 +857,12 @@
 		}
 
 
-		if (c->makesound && (sound_options & OPT_SOUND_SEND))
-			play_sound(SEND);
+		if (err >= 0) {
+			write_to_conv(c, buf, WFLAG_SEND, NULL, time((time_t)NULL));
+
+			if (c->makesound && (sound_options & OPT_SOUND_SEND))
+				play_sound(SEND);
+		}
 	} else {
 		serv_chat_send(c->gc, c->id, buf);