summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kaluza <hanzz.k@gmail.com>2011-02-05 22:38:55 +0000
committerJan Kaluza <hanzz.k@gmail.com>2011-02-05 22:38:55 +0000
commit5ad79c6da008da2b70cf3b8fbc003fd58c7bcfb0 (patch)
treebe0c1a913bbeac8cf3e38ceaa8abc94e87a35aeb
parent22657dbb52e110af4dd12f92f8285e04b0934357 (diff)
downloadpidgin-5ad79c6da008da2b70cf3b8fbc003fd58c7bcfb0.tar.gz
conversation: Move the "not typing" logic for receipt of a message to purple_conv_im_write.
This causes issues when a UI implements the write_im UI op and doesn't call purple_conversation_write (which Spectrum doesn't do), and ends up with a buddy appearing to be stuck in the typing state. Patch from Jan "HanzZ" Kaluza committer: Paul Aurich <darkrain42@pidgin.im>
-rw-r--r--ChangeLog2
-rw-r--r--libpurple/conversation.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 79c1136344..5c483cbbe0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,8 @@ version 2.7.10 (??/??/????):
Samstag) (#13073)
* Fixed bugs in purple_str_to_time() that caused the most recent 'make
check' failures. (Nader Morshed) (#13131)
+ * Correct an issue that caused some UIs other than Pidgin or Finch to
+ leave a buddy in the "is typing" state. (Jan Kaluza)
Pidgin:
* Support using the Page Up and Page Down keys on the numeric keypad in
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
index 5e70506d3a..0a57df67bc 100644
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -999,12 +999,6 @@ purple_conversation_write(PurpleConversation *conv, const char *who,
}
}
- if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) {
- if ((flags & PURPLE_MESSAGE_RECV) == PURPLE_MESSAGE_RECV) {
- purple_conv_im_set_typing_state(PURPLE_CONV_IM(conv), PURPLE_NOT_TYPING);
- }
- }
-
if (ops && ops->write_conv)
ops->write_conv(conv, who, alias, displayed, flags, mtime);
@@ -1229,6 +1223,10 @@ purple_conv_im_write(PurpleConvIm *im, const char *who, const char *message,
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)