aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2017-11-18 19:15:34 -0800
committeriximeow <me@iximeow.net>2017-11-18 19:15:34 -0800
commitc8cdc9973142eed58e4731ba6199b273303cd6c4 (patch)
tree51786a8d4dea35ab46b73407585b8e9d40e32280 /src/commands
parent69afc6b85c28b3f6ae857b369d09dea7d1b4f14e (diff)
remove silly dependence on author's handle
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/auth.rs18
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());