/pidgin/main: f870830a0d57: Also need to send an event for PURPL...
Andrew Victor
andrew.victor at mxit.com
Sun Jul 29 18:11:32 EDT 2012
Changeset: f870830a0d57d3eff8ced6fb35682097344ad3c8
Author: Andrew Victor <andrew.victor at mxit.com>
Date: 2012-07-30 00:10 +0200
Branch: mxit-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/f870830a0d57
Description:
Also need to send an event for PURPLE_NOT_TYPING - user is not typing.
diffstat:
libpurple/protocols/mxit/mxit.c | 15 +++------------
libpurple/protocols/mxit/protocol.c | 2 --
2 files changed, 3 insertions(+), 14 deletions(-)
diffs (48 lines):
diff --git a/libpurple/protocols/mxit/mxit.c b/libpurple/protocols/mxit/mxit.c
--- a/libpurple/protocols/mxit/mxit.c
+++ b/libpurple/protocols/mxit/mxit.c
@@ -675,25 +675,16 @@ static unsigned int mxit_send_typing( Pu
gchar* messageId = purple_uuid_random(); /* generate a unique message id */
switch ( state ) {
- case PURPLE_TYPING :
- purple_debug_info( MXIT_PLUGIN_ID, "Send typing state: TYPING\n");
-
+ case PURPLE_TYPING : /* currently typing */
mxit_send_msgevent( session, name, messageId, CP_MSGEVENT_TYPING );
break;
- case PURPLE_TYPED :
- purple_debug_info( MXIT_PLUGIN_ID, "Send typing state: TYPED\n");
-
+ case PURPLE_TYPED : /* stopped typing */
+ case PURPLE_NOT_TYPING : /* not typing / erased all text */
mxit_send_msgevent( session, name, messageId, CP_MSGEVENT_STOPPED );
break;
- case PURPLE_NOT_TYPING:
- purple_debug_info( MXIT_PLUGIN_ID, "Send typing state: NOT TYPING\n");
- break;
-
default:
- purple_debug_info( MXIT_PLUGIN_ID, "Send typing state: UNKNOWN\n");
-
break;
}
diff --git a/libpurple/protocols/mxit/protocol.c b/libpurple/protocols/mxit/protocol.c
--- a/libpurple/protocols/mxit/protocol.c
+++ b/libpurple/protocols/mxit/protocol.c
@@ -2042,12 +2042,10 @@ static void mxit_parse_cmd_msgevent( str
switch ( event ) {
case CP_MSGEVENT_TYPING : /* user is typing */
case CP_MSGEVENT_ANGRY : /* user is typing angrily */
- purple_debug_info( MXIT_PLUGIN_ID, "Got a TYPING event for %s\n", records[0]->fields[3]->data );
serv_got_typing( session->con, records[0]->fields[0]->data, 0, PURPLE_TYPING );
break;
case CP_MSGEVENT_STOPPED : /* user has stopped typing */
- purple_debug_info( MXIT_PLUGIN_ID, "Got a STOPPED event for %s\n", records[0]->fields[3]->data );
serv_got_typing_stopped( session->con, records[0]->fields[0]->data );
break;
More information about the Commits
mailing list