Rename the project to Echo (was fedserv)
Rebrand the daemon and workspace: the binary is now `echo`, every crate is `echo-*` (`echo-api` and the module crates), Rust imports use `echo_*`, the gRPC proto is `proto/echo.proto` with package `echo.v1`, and the log filter, gossip peer-name default, and on-disk store default (`echo.db.jsonl`) follow. Docs updated throughout. No behaviour change; crate directories and the config schema are untouched.
This commit is contained in:
parent
e7037572e5
commit
993f5b2eea
159 changed files with 660 additions and 660 deletions
|
|
@ -39,9 +39,9 @@ pub use event::Event;
|
|||
pub(crate) use event::{apply, Scope};
|
||||
|
||||
// Error kinds, the emailed-code purpose, and the module-facing views live in the
|
||||
// fedserv-api SDK crate; re-exported so the engine keeps naming them locally and
|
||||
// echo-api SDK crate; re-exported so the engine keeps naming them locally and
|
||||
// modules importing `crate::engine::db::{ChanError, ...}` are unaffected.
|
||||
pub use fedserv_api::{
|
||||
pub use echo_api::{
|
||||
AccountView, AjoinView, AkillView, BotView, Caps, GroupView, HelpView, IgnoreView, MemoView, NewsView, Privs, ReportView, SuspensionView, ChanAccessView, ChanAkickView, ChanError, ChanSetting, ChannelView, CertError, CodeKind, Kicker, RegError, Store, TriggerView, VhostView,
|
||||
};
|
||||
|
||||
|
|
@ -538,7 +538,7 @@ impl ChannelInfo {
|
|||
self.access
|
||||
.iter()
|
||||
.find(|a| a.account.eq_ignore_ascii_case(account))
|
||||
.and_then(|a| fedserv_api::level_caps(&a.level).auto)
|
||||
.and_then(|a| echo_api::level_caps(&a.level).auto)
|
||||
}
|
||||
|
||||
/// The matching auto-kick entry for `hostmask` (nick!user@host), if any.
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ impl Db {
|
|||
self.net.groups.iter().find(|g| key(&g.name) == k).map(|g| GroupView {
|
||||
name: g.name.clone(),
|
||||
founder: g.founder.clone(),
|
||||
members: g.members.iter().map(|m| fedserv_api::GroupMemberView { account: m.account.clone(), flags: m.flags.clone() }).collect(),
|
||||
members: g.members.iter().map(|m| echo_api::GroupMemberView { account: m.account.clone(), flags: m.flags.clone() }).collect(),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -409,7 +409,7 @@ impl Db {
|
|||
pub fn channel_caps(&self, channel: &str, account: &str) -> Caps {
|
||||
let Some(c) = self.channels.get(&key(channel)) else { return Caps::default() };
|
||||
if c.founder.eq_ignore_ascii_case(account) {
|
||||
return fedserv_api::level_caps("founder");
|
||||
return echo_api::level_caps("founder");
|
||||
}
|
||||
let mut caps = Caps::default();
|
||||
for a in &c.access {
|
||||
|
|
@ -418,7 +418,7 @@ impl Db {
|
|||
None => a.account.eq_ignore_ascii_case(account),
|
||||
};
|
||||
if applies {
|
||||
caps = caps.union(fedserv_api::level_caps(&a.level));
|
||||
caps = caps.union(echo_api::level_caps(&a.level));
|
||||
}
|
||||
}
|
||||
caps
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use super::*;
|
||||
|
||||
fn tmp(name: &str) -> PathBuf {
|
||||
let p = std::env::temp_dir().join(format!("fedserv-log-{name}.jsonl"));
|
||||
let p = std::env::temp_dir().join(format!("echo-log-{name}.jsonl"));
|
||||
let _ = std::fs::remove_file(&p);
|
||||
p
|
||||
}
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
#[test]
|
||||
fn formats_unix_time_as_utc() {
|
||||
assert_eq!(fedserv_api::human_time(0), "1970-01-01 00:00:00 UTC");
|
||||
assert_eq!(fedserv_api::human_time(1783844590), "2026-07-12 08:23:10 UTC");
|
||||
assert_eq!(echo_api::human_time(0), "1970-01-01 00:00:00 UTC");
|
||||
assert_eq!(echo_api::human_time(1783844590), "2026-07-12 08:23:10 UTC");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use tokio::sync::mpsc;
|
|||
use crate::proto::{NetAction, NetEvent, RegReply};
|
||||
use db::{Db, LogEntry, RegError};
|
||||
use scram::Verifier;
|
||||
use fedserv_api::Privs;
|
||||
use echo_api::Privs;
|
||||
use service::{Sender, Service, ServiceCtx};
|
||||
use state::Network;
|
||||
|
||||
|
|
@ -468,14 +468,14 @@ impl Engine {
|
|||
if let Some(lead) = self.expire_warn.filter(|_| self.db.email_enabled()) {
|
||||
if let Some(ttl) = self.account_ttl {
|
||||
for (account, email, left) in self.db.accounts_to_warn(now, ttl, lead) {
|
||||
let mail = fedserv_api::email::expiry_warning(self.db.email_brand(), self.db.email_accent(), self.db.email_logo(), "account", &account, &human_duration(left));
|
||||
let mail = echo_api::email::expiry_warning(self.db.email_brand(), self.db.email_accent(), self.db.email_logo(), "account", &account, &human_duration(left));
|
||||
self.emit_irc(NetAction::SendEmail { to: email, subject: mail.subject, text: mail.text, html: Some(mail.html) });
|
||||
self.db.mark_account_warned(&account);
|
||||
}
|
||||
}
|
||||
if let Some(ttl) = self.channel_ttl {
|
||||
for (channel, email, left) in self.db.channels_to_warn(now, ttl, lead) {
|
||||
let mail = fedserv_api::email::expiry_warning(self.db.email_brand(), self.db.email_accent(), self.db.email_logo(), "channel", &channel, &human_duration(left));
|
||||
let mail = echo_api::email::expiry_warning(self.db.email_brand(), self.db.email_accent(), self.db.email_logo(), "channel", &channel, &human_duration(left));
|
||||
self.emit_irc(NetAction::SendEmail { to: email, subject: mail.subject, text: mail.text, html: Some(mail.html) });
|
||||
self.db.mark_channel_warned(&channel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ impl Engine {
|
|||
if status == AuthorityStatus::Ok && !self.db.is_verified(name) {
|
||||
if let Some(addr) = addr {
|
||||
let code = self.db.issue_code(name, db::CodeKind::Confirm);
|
||||
let mail = fedserv_api::email::confirm(self.db.email_brand(), self.db.email_accent(), self.db.email_logo(), name, &code);
|
||||
let mail = echo_api::email::confirm(self.db.email_brand(), self.db.email_accent(), self.db.email_logo(), name, &code);
|
||||
self.emit_irc(NetAction::SendEmail { to: addr, subject: mail.subject, text: mail.text, html: Some(mail.html) });
|
||||
}
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ impl Engine {
|
|||
if ok && !self.db.is_verified(account) {
|
||||
if let (Some(addr), RegReply::NickServ { agent, uid, .. }) = (addr, &reply) {
|
||||
let code = self.db.issue_code(account, db::CodeKind::Confirm);
|
||||
let mail = fedserv_api::email::confirm(self.db.email_brand(), self.db.email_accent(), self.db.email_logo(), account, &code);
|
||||
let mail = echo_api::email::confirm(self.db.email_brand(), self.db.email_accent(), self.db.email_logo(), account, &code);
|
||||
out.push(NetAction::SendEmail { to: addr, subject: mail.subject, text: mail.text, html: Some(mail.html) });
|
||||
out.push(NetAction::Notice { from: agent.clone(), to: uid.clone(), text: "A confirmation code has been emailed to you. Confirm with \x02CONFIRM <code>\x02.".to_string() });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Sender, ServiceCtx, and the Service trait a pseudo-client implements all live
|
||||
// in the fedserv-api SDK crate; re-exported so the engine and the service
|
||||
// in the echo-api SDK crate; re-exported so the engine and the service
|
||||
// modules keep using `crate::engine::service::{...}`.
|
||||
pub use fedserv_api::{Sender, Service, ServiceCtx};
|
||||
pub use echo_api::{Sender, Service, ServiceCtx};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
|
|||
|
||||
// The read-only network view a module sees; re-exported so the engine keeps
|
||||
// naming it locally.
|
||||
pub use fedserv_api::{IncidentView, NetView, SeenView};
|
||||
pub use echo_api::{IncidentView, NetView, SeenView};
|
||||
|
||||
// The most recent moderation/action incidents kept for LOGSEARCH.
|
||||
const INCIDENT_CAP: usize = 10_000;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue