From 93cc86fe9e3be0ce83d20790327f41df3b0f6949 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 7 Mar 2011 22:24:34 -0800 Subject: Twitter: Warn the user if the OAuth username and the configured username don't match. This is not a real problem but can be confusing if you don't expect it. --- protocols/twitter/twitter.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'protocols') diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index 286d6c3c..dbe9b984 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -148,6 +148,16 @@ static gboolean twitter_oauth_callback( struct oauth_info *info ) imc_logout( ic, TRUE ); return FALSE; } + else + { + const char *sn = oauth_params_get( &info->params, "screen_name" ); + + if( sn != NULL && ic->acc->prpl->handle_cmp( sn, ic->acc->user ) != 0 ) + { + imcb_log( ic, "Warning: You logged in via OAuth as %s " + "instead of %s.", sn, ic->acc->user ); + } + } /* IM mods didn't do this so far and it's ugly but I should be able to get away with it... */ -- cgit v1.2.3