aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/jabber.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/jabber/jabber.c')
-rw-r--r--protocols/jabber/jabber.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index 9b94b21d..bf849e2a 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -144,6 +144,13 @@ static void jabber_login( account_t *acc )
{
jd->fd = jd->r_inpa = jd->w_inpa = -1;
+ if( strstr( jd->server, ".live.com" ) )
+ jd->oauth2_service = &oauth2_service_mslive;
+ else if( strstr( jd->server, ".facebook.com" ) )
+ jd->oauth2_service = &oauth2_service_facebook;
+ else
+ jd->oauth2_service = &oauth2_service_google;
+
/* For the first login with OAuth, we have to authenticate via the browser.
For subsequent logins, exchange the refresh token for a valid access
token (even though the last one maybe didn't expire yet). */