diff options
author | Krzysztof Drewniak <kdrewniak@fb.com> | 2015-07-31 02:46:34 +0300 |
---|---|---|
committer | Krzysztof Drewniak <kdrewniak@fb.com> | 2015-07-31 02:46:34 +0300 |
commit | 88dc1ae420bb7cd02dc72b10c9a270b84f16ad90 (patch) | |
tree | 62f7f71f80a73e92cec351db4516176107949f65 | |
parent | aab15d600357e185d2848a22b68b3a8bb078f7c1 (diff) |
Don't become connected without valid registratino token
The signed-on event fired before we connected to Skype in cases where
the registration token wasn't valid. This led to clients thinking they
could operated as if the user was logged in (send messages etc.) when
they could not. The status change now lives in do_all_the_things(),
where it only takes place if there is a valid registration.
-rw-r--r-- | skypeweb/libskypeweb.c | 5 | ||||
-rw-r--r-- | skypeweb/skypeweb_login.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/skypeweb/libskypeweb.c b/skypeweb/libskypeweb.c index dfad301..e4702c4 100644 --- a/skypeweb/libskypeweb.c +++ b/skypeweb/libskypeweb.c @@ -33,12 +33,13 @@ skypeweb_do_all_the_things(SkypeWebAccount *sa) purple_timeout_remove(sa->authcheck_timeout);
skypeweb_check_authrequests(sa);
sa->authcheck_timeout = purple_timeout_add_seconds(120, (GSourceFunc)skypeweb_check_authrequests, sa);
-
+ purple_connection_set_state(sa->pc, PURPLE_CONNECTED);
+
skypeweb_get_friend_list(sa);
skypeweb_poll(sa);
skype_web_get_offline_history(sa);
-
+
skypeweb_set_status(sa->account, purple_account_get_active_status(sa->account));
} else {
//Too soon!
diff --git a/skypeweb/skypeweb_login.c b/skypeweb/skypeweb_login.c index 26e23b1..3641695 100644 --- a/skypeweb/skypeweb_login.c +++ b/skypeweb/skypeweb_login.c @@ -51,8 +51,6 @@ skypeweb_login_did_auth(PurpleUtilFetchUrlData *url_data, gpointer user_data, co skypeweb_update_cookies(sa, url_text);
- purple_connection_set_state(sa->pc, PURPLE_CONNECTED);
-
skypeweb_do_all_the_things(sa);
}
|