|
|
@ -2,25 +2,21 @@ use std::cmp::Ordering; |
|
|
|
use std::collections::HashSet; |
|
|
|
use std::collections::HashSet; |
|
|
|
use std::time::Duration; |
|
|
|
use std::time::Duration; |
|
|
|
|
|
|
|
|
|
|
|
use elefren::{FediClient, SearchType, StatusBuilder}; |
|
|
|
|
|
|
|
use elefren::entities::account::Account; |
|
|
|
use elefren::entities::account::Account; |
|
|
|
use elefren::entities::prelude::Status; |
|
|
|
use elefren::entities::prelude::Status; |
|
|
|
use elefren::status_builder::Visibility; |
|
|
|
use elefren::status_builder::Visibility; |
|
|
|
|
|
|
|
use elefren::{FediClient, SearchType, StatusBuilder}; |
|
|
|
|
|
|
|
|
|
|
|
use crate::command::{RE_NOBOT_TAG, StatusCommand}; |
|
|
|
use crate::command::{StatusCommand, RE_NOBOT_TAG}; |
|
|
|
use crate::error::GroupError; |
|
|
|
use crate::error::GroupError; |
|
|
|
use crate::group_handler::GroupHandle; |
|
|
|
use crate::group_handler::GroupHandle; |
|
|
|
use crate::store::CommonConfig; |
|
|
|
|
|
|
|
use crate::store::group_config::GroupConfig; |
|
|
|
use crate::store::group_config::GroupConfig; |
|
|
|
|
|
|
|
use crate::store::CommonConfig; |
|
|
|
use crate::tr::TranslationTable; |
|
|
|
use crate::tr::TranslationTable; |
|
|
|
use crate::utils; |
|
|
|
use crate::utils; |
|
|
|
use crate::utils::{LogError, normalize_acct, VisExt}; |
|
|
|
use crate::utils::{normalize_acct, LogError, VisExt}; |
|
|
|
|
|
|
|
|
|
|
|
use crate::{ |
|
|
|
use crate::{grp_debug, grp_info, grp_warn}; |
|
|
|
grp_debug, |
|
|
|
|
|
|
|
grp_warn, |
|
|
|
|
|
|
|
grp_info |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub struct ProcessMention<'a> { |
|
|
|
pub struct ProcessMention<'a> { |
|
|
|
status: Status, |
|
|
|
status: Status, |
|
|
@ -149,8 +145,7 @@ impl<'a> ProcessMention<'a> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async fn reblog_status(&self) { |
|
|
|
async fn reblog_status(&self) { |
|
|
|
self.client.reblog(&self.status.id) |
|
|
|
self.client.reblog(&self.status.id).await.log_error("Failed to reblog status"); |
|
|
|
.await.log_error("Failed to reblog status"); |
|
|
|
|
|
|
|
self.delay_after_post().await; |
|
|
|
self.delay_after_post().await; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -675,7 +670,11 @@ impl<'a> ProcessMention<'a> { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if self.config.is_member_only() { |
|
|
|
if self.config.is_member_only() { |
|
|
|
self.add_reply(crate::tr!(self, "help_group_info_closed", membership = &membership_line)); |
|
|
|
self.add_reply(crate::tr!( |
|
|
|
|
|
|
|
self, |
|
|
|
|
|
|
|
"help_group_info_closed", |
|
|
|
|
|
|
|
membership = &membership_line |
|
|
|
|
|
|
|
)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
self.add_reply(crate::tr!(self, "help_group_info_open", membership = &membership_line)); |
|
|
|
self.add_reply(crate::tr!(self, "help_group_info_open", membership = &membership_line)); |
|
|
|
} |
|
|
|
} |
|
|
|