add /undo, update help, readme and changelog; fix follow to join
This commit is contained in:
+34
-2
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user