diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-03-07 22:24:34 -0800 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-03-07 22:24:34 -0800 | 
| commit | 93cc86fe9e3be0ce83d20790327f41df3b0f6949 (patch) | |
| tree | 3d44c9f1226b8b9302df5d368b412360cfb91cca /protocols | |
| parent | 9e9140b16ab7551c0588a58f065d7c9fbc8475fe (diff) | |
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.
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/twitter/twitter.c | 10 | 
1 files changed, 10 insertions, 0 deletions
| 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... */ | 
