pub struct ControlFollow {
pub updated: Option<CommunityV2>,
pub authority_changed: bool,
}Expand description
Re-fold this community’s Control Plane and apply the current metadata + public channel set to the held community, persisting any change. Called when a control-plane wrap arrives in realtime (a rename, a new channel, an edited description) so a long-running bot tracks the community mid-session instead of freezing at its join-time view.
Authority (CORD-04 §5): the roster (roles/grants/banlist) folds first into
the owner-seeded authorized set ([fold_authority]), then each metadata/channel
edition is eligible only if its signer CURRENTLY holds the entity’s management
bit (MANAGE_METADATA/MANAGE_CHANNELS) — so an authorized admin’s edits fold,
a demoted one’s drop. The owner is supreme, proven by the self-certifying
community_id (no network trust).
Private channels are skipped here: a Private channel’s Chat-Plane key is
delivered over the rekey plane (or an invite bundle), never derivable from a
control edition alone. A new Private channel therefore surfaces only once
follow_rekeys delivers its key. Public channels derive from the
community_root, so they fold in directly.
Returns the updated community iff something changed (so the caller can skip a
redundant re-subscribe + refresh notification).
What a control fold moved. updated is the community DOCUMENT (metadata,
channels, adopted control root); authority_changed is the roster/banlist/
registry — which live in their own columns and so are invisible in updated.
The distinction is load-bearing: the rekey walk’s authority gates read exactly
the state authority_changed covers, so a caller that keys its retry off
updated alone will refuse a rotation on pass 1, silently fix the roster on
pass 2, and never look again. That is a permanent strand — and a strand is a
fork to everyone else.
Fields§
§updated: Option<CommunityV2>Implementations§
Trait Implementations§
Source§impl Debug for ControlFollow
impl Debug for ControlFollow
Auto Trait Implementations§
impl Freeze for ControlFollow
impl RefUnwindSafe for ControlFollow
impl Send for ControlFollow
impl Sync for ControlFollow
impl Unpin for ControlFollow
impl UnsafeUnpin for ControlFollow
impl UnwindSafe for ControlFollow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more