memoserv: complete + improve the memo service

Finish MemoServ on the typed, event-logged memo model: Db memo_send/list/read/
del/unread_memos + Store facade, and a new fedserv-memoserv crate (a default
service). Beyond the basics: SEND caps a mailbox (30) so nobody's flooded, READ
takes <num>|NEW|ALL, DEL takes <num>|ALL, LIST previews and flags unread, and
NickServ notifies you of waiting memos on login. Memos persist and federate
(Global scope) like other account data. Also lands NetAction::QuitUser (BotServ
plumbing). Data + delivery/login-notify tests.
This commit is contained in:
Jean Chevronnet 2026-07-13 04:50:27 +00:00
parent 651cb683de
commit 577c05ad2e
No known key found for this signature in database
12 changed files with 374 additions and 6 deletions

View file

@ -58,6 +58,11 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db:
for entry in db.ajoin_list(&account) {
ctx.force_join(from.uid, &entry.channel, &entry.key);
}
// Let them know about waiting memos.
let unread = db.unread_memos(&account);
if unread > 0 {
ctx.notice(me, from.uid, format!("You have \x02{unread}\x02 new memo(s). Read them with \x02/msg MemoServ READ NEW\x02."));
}
}
None => {
db.note_auth(account_name, false);