MemoServ: add CANCEL, CHECK, and INFO
All checks were successful
CI / check (push) Successful in 3m49s

CANCEL recalls the sender's most recent unread memo to a target (one the
recipient already read can't be recalled); CHECK reports whether the last
memo you sent someone has been read; INFO summarises your mailbox. Adds
memo_cancel/memo_check store methods and shares MAX_MEMOS from the module
root instead of duplicating it in send.rs.
This commit is contained in:
Jean Chevronnet 2026-07-15 18:09:33 +00:00
parent a26ee722d1
commit 98ecbca414
No known key found for this signature in database
9 changed files with 118 additions and 2 deletions

View file

@ -1020,6 +1020,10 @@ pub trait Store {
fn memo_read(&mut self, account: &str, index: usize) -> Option<MemoView>;
fn memo_del(&mut self, account: &str, index: usize) -> bool;
fn unread_memos(&self, account: &str) -> usize;
/// Recall the most recent unread memo `sender` left for `account` (true if one was).
fn memo_cancel(&mut self, account: &str, sender: &str) -> bool;
/// Read-status and timestamp of the most recent memo `sender` left for `account`.
fn memo_check(&self, account: &str, sender: &str) -> Option<(bool, u64)>;
fn set_entrymsg(&mut self, channel: &str, msg: &str) -> Result<(), ChanError>;
fn set_founder(&mut self, channel: &str, account: &str) -> Result<(), ChanError>;
fn access_add(&mut self, channel: &str, account: &str, level: &str) -> Result<(), ChanError>;