OperServ: INFO staff notes on accounts and channels

INFO ADD <target> <note> / DEL <target> / <target> attaches a staff note
to an account or channel (a #name is a channel, else an account). The note
is shown in that service's INFO — but to operators only (Priv::Auspex),
never to the account's own owner. Admin-only to set.

Follows the typed-field-on-the-entity pattern: an oper_note field folded
through AccountOperNoteSet (Global) / ChannelOperNoteSet (Local) events,
read via dedicated Store getters so it stays out of the public views and
the directory feed.
This commit is contained in:
Jean Chevronnet 2026-07-14 01:15:00 +00:00
parent 8ccc9fa8ea
commit 51d4ebf789
No known key found for this signature in database
8 changed files with 216 additions and 9 deletions

View file

@ -168,7 +168,9 @@ fn to_wire(entry: &LogEntry) -> Option<ReplicationEvent> {
| Event::AkillAdded { .. }
| Event::AkillRemoved { .. }
| Event::AccountExpiryWarned { .. }
| Event::ChannelExpiryWarned { .. } => return None,
| Event::ChannelExpiryWarned { .. }
| Event::AccountOperNoteSet { .. }
| Event::ChannelOperNoteSet { .. } => return None,
};
Some(ReplicationEvent { origin: entry.origin().to_string(), seq: entry.seq(), lamport: entry.lamport(), kind: Some(kind) })
}
@ -428,6 +430,7 @@ mod tests {
last_seen: 111,
noexpire: false,
expiry_warned: false,
oper_note: None,
};
let registered = LogEntry::for_test("A", 0, 1, Event::AccountRegistered(Box::new(acct)));
let wire = to_wire(&registered).expect("account registration replicates");