diff options
Diffstat (limited to 'src/commands/dm.rs')
-rw-r--r-- | src/commands/dm.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/commands/dm.rs b/src/commands/dm.rs index 95f65b7..f6fcbfd 100644 --- a/src/commands/dm.rs +++ b/src/commands/dm.rs @@ -42,7 +42,12 @@ fn dm(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer, displ let encoded = ::url_encode(dm_text); let result = match tweeter.current_profile() { Some(user_profile) => { - queryer.do_api_post(&format!("{}?text={}&screen_name={}", DM_CREATE_URL, encoded, normalized_handle), &tweeter.app_key, &user_profile.creds) + queryer.do_api_post( + DM_CREATE_URL, + &vec![("text", &encoded), ("screen_name", &normalized_handle)], + &tweeter.app_key, + &user_profile.creds + ) }, None => Err("No logged in user to DM as".to_owned()) }; |