diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2009-11-26 00:04:40 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2009-11-26 00:04:40 +0000 |
commit | 487f555c687571cee39d69b3954b4d1f82811d29 (patch) | |
tree | 55b9b9d359e391850bda0fd3e0402399d810a672 /protocols | |
parent | e5d8d21fd20516be53f873d269b469be109eca91 (diff) |
Support for sending zomg-im-typing notifications.
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/purple/purple.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c index 50770187..6bb8fc99 100644 --- a/protocols/purple/purple.c +++ b/protocols/purple/purple.c @@ -242,9 +242,26 @@ static void purple_keepalive( struct im_connection *ic ) { } -static int purple_send_typing( struct im_connection *ic, char *who, int typing ) +static int purple_send_typing( struct im_connection *ic, char *who, int flags ) { - return 1; + PurpleTypingState state = PURPLE_NOT_TYPING; + PurpleConversation *conv; + + if( flags & OPT_TYPING ) + state = PURPLE_TYPING; + else if( flags & OPT_THINKING ) + state = PURPLE_TYPED; + + if( ( conv = purple_find_conversation_with_account( PURPLE_CONV_TYPE_IM, + who, ic->proto_data ) ) == NULL ) + { + purple_conv_im_set_typing_state( purple_conversation_get_im_data( conv ), state ); + return 1; + } + else + { + return 0; + } } static void purple_ui_init(); |