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
+8 -2
View File
@@ -18,12 +18,14 @@ use crate::store::ConfigStore;
use crate::store::data::GroupConfig;
use crate::utils::{LogError, normalize_acct, VisExt};
use crate::command::StatusCommand;
use elefren::entities::account::Account;
mod handle_mention;
/// This is one group's config store capable of persistence
#[derive(Debug)]
pub struct GroupHandle {
pub(crate) group_account: Account,
pub(crate) client: FediClient,
pub(crate) config: GroupConfig,
pub(crate) store: Arc<ConfigStore>,
@@ -440,7 +442,7 @@ impl GroupHandle {
admins.sort();
format!("\
@{user} Welcome! This group has posting restricted to members. \
@{user} Welcome to the group! This group has posting restricted to members. \
If you'd like to join, please ask one of the group admins:\n\
{admins}",
user = notif_acct,
@@ -448,9 +450,13 @@ impl GroupHandle {
)
} else {
follow_back = true;
self.config.set_member(notif_acct, true)
.log_error("Fail add a member");
format!("\
@{user} Welcome to the group! The group user will now follow you back to complete the sign-up. \
To share a post, tag the group user or use one of the group hashtags.\n\n\
To share a post, @ the group user or use a group hashtag.\n\n\
Use /help for more info.",
user = notif_acct
)