Mercurial > pidgin
changeset 27196:c0f1ae3e16e0
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.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 27 Jun 2009 22:43:45 +0000 |
parents | 1a255e11c02b |
children | c29a3fac6032 |
files | libpurple/protocols/yahoo/yahoo.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,