comparison libpurple/protocols/msn/session.c @ 23554:ab70eae012f5

Fixup MSN mailbox handling based on a patch from Felipe, plus various other things that I cleaned up in the URL command handler. Updates are now made after at least 750 seconds because Felipe found that to be the magic value, and updating every time we receive a QNG is totally unreliable. They aren't even received when using the HTTP method, for example. Opening the inbox is now always available. I'm not sure why it was limited to just @hotmail.com and @msn.com, but I certainly haven't been testing with either of those. I think the correct way to determine if an inbox exists is to just use the URL command and see, but I don't have one of those no-inbox accounts. The initial email notification is no longer called explicitly for @hotmail.com and @msn.com accounts. I, at least, get an initial mail notification, but the rest of Felipe's patch negates the need to do this, anyway. References #5762.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 17 Jul 2008 05:25:48 +0000
parents fd276936164f
children 7f4b697c6947
comparison
equal deleted inserted replaced
23553:2a4341e3d2da 23554:ab70eae012f5
452 msn_session_finish_login(MsnSession *session) 452 msn_session_finish_login(MsnSession *session)
453 { 453 {
454 PurpleAccount *account; 454 PurpleAccount *account;
455 PurpleConnection *gc; 455 PurpleConnection *gc;
456 PurpleStoredImage *img; 456 PurpleStoredImage *img;
457 const char *passport;
458 457
459 if (session->logged_in) 458 if (session->logged_in)
460 return; 459 return;
461 460
462 account = session->account; 461 account = session->account;
472 471
473 purple_connection_set_state(gc, PURPLE_CONNECTED); 472 purple_connection_set_state(gc, PURPLE_CONNECTED);
474 473
475 /* Sync users */ 474 /* Sync users */
476 msn_session_sync_users(session); 475 msn_session_sync_users(session);
477 /* It seems that some accounts that haven't accessed hotmail for a while 476 }
478 * and @msn.com accounts don't automatically get the initial email 477
479 * notification so we always request it on login
480 */
481
482 passport = purple_normalize(account, purple_account_get_username(account));
483
484 if ((strstr(passport, "@hotmail.") != NULL) ||
485 (strstr(passport, "@msn.com") != NULL))
486 {
487 msn_cmdproc_send(session->notification->cmdproc, "URL", "%s", "INBOX");
488 }
489 }
490