add /undo, update help, readme and changelog; fix follow to join

This commit is contained in:
2021-08-27 21:52:33 +02:00
parent 385d43c0aa
commit 98fe694d47
8 changed files with 127 additions and 30 deletions
+34 -2
View File
@@ -67,12 +67,27 @@ impl ConfigStore {
let client = elefren::helpers::cli::authenticate(registration).await?;
let appdata = client.data.clone();
let data = GroupConfig::new(opts.acct, appdata);
let data = GroupConfig::new(opts.acct.clone(), appdata);
// save & persist
self.set_group_config(data.clone()).await?;
let group_account = match client.verify_credentials().await {
Ok(account) => {
info!(
"Group account verified: @{}, \"{}\"",
account.acct, account.display_name
);
account
}
Err(e) => {
error!("Group @{} auth error: {}", opts.acct, e);
return Err(e.into());
}
};
Ok(GroupHandle {
group_account,
client,
config: data,
store: self.clone(),
@@ -101,7 +116,22 @@ impl ConfigStore {
config.set_appdata(appdata);
self.set_group_config(config.clone()).await?;
let group_account = match client.verify_credentials().await {
Ok(account) => {
info!(
"Group account verified: @{}, \"{}\"",
account.acct, account.display_name
);
account
}
Err(e) => {
error!("Group @{} auth error: {}", acct, e);
return Err(e.into());
}
};
Ok(GroupHandle {
group_account,
client,
config,
store: self.clone(),
@@ -125,12 +155,13 @@ impl ConfigStore {
let client = FediClient::from(gc.get_appdata().clone());
match client.verify_credentials().await {
let my_account = match client.verify_credentials().await {
Ok(account) => {
info!(
"Group account verified: @{}, \"{}\"",
account.acct, account.display_name
);
account
}
Err(e) => {
error!("Group @{} auth error: {}", gc.get_acct(), e);
@@ -139,6 +170,7 @@ impl ConfigStore {
};
Some(GroupHandle {
group_account: my_account,
client,
config: gc,
store: self.clone(),