comparison libpurple/protocols/myspace/myspace.c @ 19597:1b22d4c6fe47

Add uid field to add buddy persistance request. Now adding buddies to the server-side contacts should work. Closes #2658 server-side contacts.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Tue, 04 Sep 2007 00:10:03 +0000
parents 30625863ae2b
children 339c7c8c0e08 d47bfe67552a
comparison
equal deleted inserted replaced
19596:582a5608cfc1 19597:1b22d4c6fe47
1842 void 1842 void
1843 msim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) 1843 msim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
1844 { 1844 {
1845 MsimSession *session; 1845 MsimSession *session;
1846 MsimMessage *msg; 1846 MsimMessage *msg;
1847 /* MsimMessage *msg_persist; */ 1847 MsimMessage *msg_persist;
1848 MsimMessage *body; 1848 MsimMessage *body;
1849 1849
1850 session = (MsimSession *)gc->proto_data; 1850 session = (MsimSession *)gc->proto_data;
1851 purple_debug_info("msim", "msim_add_buddy: want to add %s to %s\n", 1851 purple_debug_info("msim", "msim_add_buddy: want to add %s to %s\n",
1852 buddy->name, (group && group->name) ? group->name : "(no group)"); 1852 buddy->name, (group && group->name) ? group->name : "(no group)");
1877 "NameSelect", MSIM_TYPE_INTEGER, 0, 1877 "NameSelect", MSIM_TYPE_INTEGER, 0,
1878 NULL); 1878 NULL);
1879 1879
1880 /* TODO: Update blocklist. */ 1880 /* TODO: Update blocklist. */
1881 1881
1882 #if 0
1883 msg_persist = msim_msg_new( 1882 msg_persist = msim_msg_new(
1884 "persist", MSIM_TYPE_INTEGER, 1, 1883 "persist", MSIM_TYPE_INTEGER, 1,
1885 "sesskey", MSIM_TYPE_INTEGER, session->sesskey, 1884 "sesskey", MSIM_TYPE_INTEGER, session->sesskey,
1886 "cmd", MSIM_TYPE_INTEGER, MSIM_CMD_BIT_ACTION | MSIM_CMD_PUT, 1885 "cmd", MSIM_TYPE_INTEGER, MSIM_CMD_BIT_ACTION | MSIM_CMD_PUT,
1887 "dsn", MSIM_TYPE_INTEGER, MC_CONTACT_INFO_DSN, 1886 "dsn", MSIM_TYPE_INTEGER, MC_CONTACT_INFO_DSN,
1887 "uid", MSIM_TYPE_INTEGER, session->userid,
1888 "lid", MSIM_TYPE_INTEGER, MC_CONTACT_INFO_LID, 1888 "lid", MSIM_TYPE_INTEGER, MC_CONTACT_INFO_LID,
1889 /* TODO: Use msim_new_reply_callback to get rid. */ 1889 /* TODO: Use msim_new_reply_callback to get rid. */
1890 "rid", MSIM_TYPE_INTEGER, session->next_rid++, 1890 "rid", MSIM_TYPE_INTEGER, session->next_rid++,
1891 "body", MSIM_TYPE_DICTIONARY, body, 1891 "body", MSIM_TYPE_DICTIONARY, body,
1892 NULL); 1892 NULL);
1896 purple_notify_error(NULL, NULL, _("Failed to add buddy"), _("persist command failed")); 1896 purple_notify_error(NULL, NULL, _("Failed to add buddy"), _("persist command failed"));
1897 msim_msg_free(msg_persist); 1897 msim_msg_free(msg_persist);
1898 return; 1898 return;
1899 } 1899 }
1900 msim_msg_free(msg_persist); 1900 msim_msg_free(msg_persist);
1901 #endif
1902 1901
1903 } 1902 }
1904 1903
1905 /** Perform actual postprocessing on a message, adding userid as specified. 1904 /** Perform actual postprocessing on a message, adding userid as specified.
1906 * 1905 *