diff options
author | Eion Robb <eion@robbmob.com> | 2016-08-08 10:28:15 +0300 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2016-08-08 10:28:15 +0300 |
commit | 4ece5548beba5019507a32f2e0fb89ca9d584c4f (patch) | |
tree | 641110e4e96b4112691fec773db80eb8671c0148 | |
parent | a87f3f69e678f12a0b5597ceac9e3f1462d24b21 (diff) |
Faster logins if we have already logged in recently
-rw-r--r-- | skypeweb/libskypeweb.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/skypeweb/libskypeweb.c b/skypeweb/libskypeweb.c index 508aec9..d27466d 100644 --- a/skypeweb/libskypeweb.c +++ b/skypeweb/libskypeweb.c @@ -320,12 +320,17 @@ skypeweb_login(PurpleAccount *account) sa->sent_messages_hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
sa->waiting_conns = g_queue_new();
sa->messages_host = g_strdup(SKYPEWEB_DEFAULT_MESSAGES_HOST);
+ sa->url_datas = NULL;
- if(strchr(purple_account_get_username(account), '@')) {
- //Has an email address for a username, probably a microsoft account?
- skypeweb_begin_oauth_login(sa);
+ if (purple_account_get_string(account, "refresh-token", NULL)) {
+ skypeweb_refresh_token_login(sa);
} else {
- skypeweb_begin_web_login(sa);
+ if (strchr(purple_account_get_username(account), '@')) {
+ //Has an email address for a username, probably a microsoft account?
+ skypeweb_begin_oauth_login(sa);
+ } else {
+ skypeweb_begin_web_login(sa);
+ }
}
purple_signal_connect(purple_conversations_get_handle(), "conversation-updated", pc, PURPLE_CALLBACK(skypeweb_mark_conv_seen), NULL);
|