diff options
author | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-11-18 19:15:34 -0800 |
---|---|---|
committer | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-11-18 19:15:34 -0800 |
commit | 1de0593b707540b4c1bd03f2c0a151281a893be6 (patch) | |
tree | 51786a8d4dea35ab46b73407585b8e9d40e32280 /src/commands | |
parent | a3966446bab8bf849457c24a9a6d05216f950e11 (diff) |
remove silly dependence on author's handle
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/auth.rs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/commands/auth.rs b/src/commands/auth.rs index 65dcaf5..0743d4e 100644 --- a/src/commands/auth.rs +++ b/src/commands/auth.rs @@ -78,10 +78,26 @@ fn pin(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer) { } // turns out the "actual" oauth creds are different // TODO: profile names? + /* + * Option 1: + * ask user. + * yes, but I want this to be optional though (auth, pin 1234, profile now + * named main or after you or something) + * Option 2: + * make a request for profile settings when auth succeeds + * this becomes the fallback when nothing is provided in option 1 + * what happens when you successfully auth, internet drops, and you fail to + * request settings? + * + * fallback to asking user to name the profile, i guess? + */ + if tweeter.curr_profile.is_none() { + tweeter.curr_profile = Some("default".to_owned()); + } tweeter.add_profile(tw::TwitterProfile::new(tw::Credential { key: as_map["oauth_token"].to_owned(), secret: as_map["oauth_token_secret"].to_owned() - }, tw::user::User::default()), Some("iximeow".to_owned())); + }, tw::user::User::default()), Some("default".to_owned())); tweeter.WIP_auth = None; tweeter.state = tw::AppState::Reconnect; tweeter.display_info.status("Looks like you authed! Connecting...".to_owned()); |