update community backend

This commit is contained in:
2026-09-20 09:32:39 +07:00
parent 5c9005d473
commit 10e53b9fcc
4 changed files with 183 additions and 27 deletions
+6 -6
View File
@@ -104,12 +104,12 @@ pub fn send(
where `timer` is `control.community.message_expiration` and `at_ms` is now in ms;
`cord03::seal_rumor(&rumor, &plane, &signer, false)`; then — the order matters —
`cord03::open(&wrap, &plane, channel, epoch)` and `store::cache_rumor` *before*
`client.send_event(&wrap).to(&state.relays)`, so the author's own row exists
whether or not a relay answers. Add the community's relays with `add_relay(..)
.and_connect()` first, the way `sync::publish_wraps` does — lifting that loop into
a `pub(crate) sync::publish_wrap(client, &wrap, &relays)` keeps one copy. Publish
failures only `log::warn!`. `seal_rumor` needs the channel's `GroupKey` from
`derive::channel_group_key(secret, channel, epoch)`, and the epoch from
publishing, so the author's own row exists whether or not a relay answers. The
publish is `pub(crate) sync::connect_relays(client, &relays)` (the
`add_relay(..).and_connect()` loop the genesis path already ran) followed by
`pub(crate) sync::publish_wrap(client, &wrap, &relays)`, so one copy serves both
paths; failures only `log::warn!`. `seal_rumor` needs the channel's `GroupKey`
from `derive::channel_group_key(secret, channel, epoch)`, and the epoch from
`channel_secret`. Returns `None` without a signer or a held secret, and the rumor
id so the panel can reload.