# HG changeset patch # User Sadrul Habib Chowdhury # Date 1246142625 0 # Node ID c0f1ae3e16e031de30068120f0fdebc524801e6c # Parent 1a255e11c02bcf591b4f105e25a17a2ec4937f76 Use the active-id the message was sent to when sending the ack. Yahoo allows you to have multiple 'id'/'profile's associated with the same account. If a message is sent to the currently non-active id, then we need to use that id when sending the ack. Otherwise we end up getting the message replayed to us in seven seconds. diff -r 1a255e11c02b -r c0f1ae3e16e0 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Sat Jun 27 10:37:26 2009 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sat Jun 27 22:43:45 2009 +0000 @@ -825,6 +825,7 @@ struct _yahoo_im { char *from; + char *active_id; int time; int utf8; int buddy_icon; @@ -919,6 +920,8 @@ im->time = time(NULL); im->utf8 = TRUE; } + if (im && pair->key == 5) + im->active_id = pair->value; if (pair->key == 97) if (im) im->utf8 = strtol(pair->value, NULL, 10); @@ -1029,7 +1032,7 @@ pkt2 = yahoo_packet_new(YAHOO_SERVICE_MESSAGE_ACK, YAHOO_STATUS_AVAILABLE, pkt->id); yahoo_packet_hash(pkt2, "ssisii", - 1, purple_connection_get_display_name(gc), + 1, im->active_id, /* May not always be the connection's display name */ 5, im->from, 302, 430, 430, im->id,