comparison libpurple/protocols/yahoo/libymsg.c @ 28665:60e4ef6801ff

I think this is the more correct way of determining invisibility.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 26 Sep 2009 17:38:05 +0000
parents 4bf9579328f0
children 7e2e95508a3a 057372f5c319
comparison
equal deleted inserted replaced
28664:208fbf27d987 28665:60e4ef6801ff
4284 } 4284 }
4285 } 4285 }
4286 4286
4287 msn = !g_ascii_strncasecmp(who, "msn/", 4); 4287 msn = !g_ascii_strncasecmp(who, "msn/", 4);
4288 4288
4289 if( strncmp(who, "+", 1) == 0 ) { 4289 if (who[0] == '+') {
4290 /* we have an sms to be sent */ 4290 /* we have an sms to be sent */
4291 gchar *carrier = NULL; 4291 gchar *carrier = NULL;
4292 const char *alias = NULL; 4292 const char *alias = NULL;
4293 PurpleAccount *account = purple_connection_get_account(gc); 4293 PurpleAccount *account = purple_connection_get_account(gc);
4294 PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, who, account); 4294 PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, who, account);
4541 else if (!idle && yd->current_status == YAHOO_STATUS_IDLE) { 4541 else if (!idle && yd->current_status == YAHOO_STATUS_IDLE) {
4542 status = purple_presence_get_active_status(purple_account_get_presence(purple_connection_get_account(gc))); 4542 status = purple_presence_get_active_status(purple_account_get_presence(purple_connection_get_account(gc)));
4543 yd->current_status = get_yahoo_status_from_purple_status(status); 4543 yd->current_status = get_yahoo_status_from_purple_status(status);
4544 } 4544 }
4545 4545
4546 invisible = !( purple_presence_is_available(purple_account_get_presence(purple_connection_get_account(gc))) ); 4546 invisible = (yd->current_status == YAHOO_STATUS_INVISIBLE);
4547 4547
4548 pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_STATUS_UPDATE, YAHOO_STATUS_AVAILABLE, yd->session_id); 4548 pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_STATUS_UPDATE, YAHOO_STATUS_AVAILABLE, yd->session_id);
4549 4549
4550 if (!idle && invisible) 4550 if (!idle && invisible)
4551 yahoo_packet_hash_int(pkt, 10, YAHOO_STATUS_AVAILABLE); 4551 yahoo_packet_hash_int(pkt, 10, YAHOO_STATUS_AVAILABLE);