pidgin: ae327bc8: Use the active-id the message was sent t...
sadrul at pidgin.im
sadrul at pidgin.im
Sat Jun 27 19:50:34 EDT 2009
-----------------------------------------------------------------
Revision: ae327bc8a249f9d8fced9c1ce208a5781f10056a
Ancestor: e3db8629d098a4318adb11e239f378fb739ff2f9
Author: sadrul at pidgin.im
Date: 2009-06-27T22:43:45
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ae327bc8a249f9d8fced9c1ce208a5781f10056a
Modified files:
libpurple/protocols/yahoo/yahoo.c
ChangeLog:
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.
-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo.c ab22e234c7777d6ac45dc29d64273467145e767d
+++ libpurple/protocols/yahoo/yahoo.c e889e328587a5e3c7aaeccf89f12c136b086a149
@@ -825,6 +825,7 @@ struct _yahoo_im {
struct _yahoo_im {
char *from;
+ char *active_id;
int time;
int utf8;
int buddy_icon;
@@ -919,6 +920,8 @@ static void yahoo_process_message(Purple
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 @@ static void yahoo_process_message(Purple
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,
More information about the Commits
mailing list