pidgin: f7807039: Fix a bug where if "Show our presence on...
markdoliner at pidgin.im
markdoliner at pidgin.im
Tue Dec 16 19:10:39 EST 2008
-----------------------------------------------------------------
Revision: f7807039eeef499a403d638cbcb94060a1d33eea
Ancestor: 26a39f0c3cf8566f65049dc63002a1f8d726f09a
Author: markdoliner at pidgin.im
Date: 2008-12-17T00:06:05
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f7807039eeef499a403d638cbcb94060a1d33eea
Modified files:
libpurple/protocols/myspace/myspace.c
ChangeLog:
Fix a bug where if "Show our presence only to people on our buddy list"
is true and we remove someone from our buddy list then re-add them they
would not see our presence until the next time we logged out and back on.
-------------- next part --------------
============================================================
--- libpurple/protocols/myspace/myspace.c f44518bab265fb22a5bddbb9b6eb022fb58360ff
+++ libpurple/protocols/myspace/myspace.c 552ac56c5042fbcf034ee6f924be0f9390a3375a
@@ -2549,6 +2549,7 @@ msim_add_buddy(PurpleConnection *gc, Pur
MsimMessage *msg;
MsimMessage *msg_persist;
MsimMessage *body;
+ GList *blocklist_updates;
session = (MsimSession *)gc->proto_data;
purple_debug_info("msim", "msim_add_buddy: want to add %s to %s\n",
@@ -2601,6 +2602,27 @@ msim_add_buddy(PurpleConnection *gc, Pur
return;
}
msim_msg_free(msg_persist);
+
+ /* Remove the buddy from our block list and add them to our accept list, I think */
+ blocklist_updates = NULL;
+ blocklist_updates = g_list_prepend(blocklist_updates, "a+");
+ blocklist_updates = g_list_prepend(blocklist_updates, "<uid>");
+ blocklist_updates = g_list_prepend(blocklist_updates, "b-");
+ blocklist_updates = g_list_prepend(blocklist_updates, "<uid>");
+ blocklist_updates = g_list_reverse(blocklist_updates);
+
+ msg = msim_msg_new(
+ "blocklist", MSIM_TYPE_BOOLEAN, TRUE,
+ "sesskey", MSIM_TYPE_INTEGER, session->sesskey,
+ /* TODO: MsimMessage lists. Currently <uid> isn't replaced in lists. */
+ /* "idlist", MSIM_TYPE_STRING, g_strdup("a-|<uid>|b-|<uid>"), */
+ "idlist", MSIM_TYPE_LIST, blocklist_updates,
+ NULL);
+
+ if (!msim_postprocess_outgoing(session, msg, buddy->name, "idlist", NULL))
+ purple_debug_error("myspace", "blocklist command failed\n");
+
+ msim_msg_free(msg);
}
/**
@@ -2649,6 +2671,7 @@ msim_remove_buddy(PurpleConnection *gc,
}
msim_msg_free(persist_msg);
+ /* Remove the buddy from our block list(huh?) and our accept list */
blocklist_updates = NULL;
blocklist_updates = g_list_prepend(blocklist_updates, "a-");
blocklist_updates = g_list_prepend(blocklist_updates, "<uid>");
More information about the Commits
mailing list