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