Mercurial > pidgin
changeset 19452:eb0fe583bc53
merge of 'cacb6312fda77c93ab3e7557fdea3c2956cc55ad'
and 'f5aeed9a6e0c9cb68e829608dc9d41f7782fe487'
author | Kevin Stange <kevin@simguy.net> |
---|---|
date | Sun, 26 Aug 2007 18:59:59 +0000 |
parents | 0202145e3465 (diff) 4a7e5f947b1e (current diff) |
children | 52a67d7b82ac |
files | |
diffstat | 2 files changed, 17 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c Sun Aug 26 16:23:08 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Sun Aug 26 18:59:59 2007 +0000 @@ -2995,12 +2995,16 @@ if (g_ascii_strcasecmp(proto, "myim")) return FALSE; - uid_str = g_hash_table_lookup(params, "uID"); - cid_str = g_hash_table_lookup(params, "cID"); + /* Parameters are case-insensitive. */ + uid_str = g_hash_table_lookup(params, "uid"); + cid_str = g_hash_table_lookup(params, "cid"); uid = uid_str ? atol(uid_str) : 0; cid = cid_str ? atol(cid_str) : 0; + /* Need a contact. */ + g_return_val_if_fail(cid != 0, FALSE); + /* Find our account with specified user id, or use first connected account if uid=0. */ account = NULL; l = purple_accounts_get_all(); @@ -3020,18 +3024,21 @@ return FALSE; } + /* TODO: msim_lookup_user() on cid, so can add by username? */ + /* myim:sendIM?uID=USERID&cID=CONTACTID */ if (!g_ascii_strcasecmp(cmd, "sendIM")) { PurpleConversation *conv; conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, cid_str, account); - if (!conv) + if (!conv) { + purple_debug_info("msim_uri_handler", "creating new conversation for %s\n", cid_str); conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, cid_str); + } + + /* Just open the window so the user can send an IM. */ purple_conversation_present(conv); - /* TODO: where to get the message? or is there any? */ - purple_conv_send_confirm(conv, "test"); - /* myim:addContact?uID=USERID&cID=CONTACTID */ } else if (!g_ascii_strcasecmp(cmd, "addContact")) { purple_blist_request_add_buddy(account, cid_str, _("Buddies"), NULL);
--- a/pidgin/win32/nsis/pidgin-installer.nsi Sun Aug 26 16:23:08 2007 +0000 +++ b/pidgin/win32/nsis/pidgin-installer.nsi Sun Aug 26 18:59:59 2007 +0000 @@ -554,6 +554,10 @@ Push "msnim" Call RegisterURIHandler SectionEnd + Section /o "myim:" SecURI_MYIM + Push "myim" + Call RegisterURIHandler + SectionEnd Section /o "ymsgr:" SecURI_YMSGR Push "ymsgr" Call RegisterURIHandler