s2s: handle echo's metadata profile keys, standard replies, OPERTYPE and REDACT; emit ssl_cert + OPERTYPE
This commit is contained in:
parent
8f765bfba7
commit
5722640957
4 changed files with 157 additions and 12 deletions
|
|
@ -66,6 +66,16 @@ pub fn record(
|
|||
}
|
||||
}
|
||||
|
||||
/// Drop a message from a conversation's history by msgid (a redaction), so replays
|
||||
/// don't resurrect it. Used by both the client REDACT command and an inbound S2S REDACT.
|
||||
pub fn forget(s: &mut Server, key: &str, msgid: &str) {
|
||||
if let Some(h) = s.ext.get_mut::<History>() {
|
||||
if let Some(buf) = h.0.get_mut(key) {
|
||||
buf.retain(|m| m.msgid != msgid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Canonical CHATHISTORY key for a DM between two nicks (order-independent; the
|
||||
/// `\0` prefix keeps it from ever colliding with a `#channel` key).
|
||||
pub fn dm_key(a: &str, b: &str) -> String {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue