add guestbook and moderation
This commit is contained in:
@@ -118,6 +118,8 @@ pub struct CommunityState {
|
||||
pub relays: Vec<RelayUrl>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub heads: Vec<EntityHead>,
|
||||
#[serde(default, skip_serializing_if = "BTreeSet::is_empty")]
|
||||
pub banned: BTreeSet<PublicKey>,
|
||||
pub added_at_ms: u64,
|
||||
}
|
||||
|
||||
@@ -183,6 +185,7 @@ impl CommunityState {
|
||||
channels,
|
||||
relays,
|
||||
heads,
|
||||
banned: BTreeSet::new(),
|
||||
added_at_ms,
|
||||
})
|
||||
}
|
||||
@@ -200,6 +203,7 @@ impl CommunityState {
|
||||
|
||||
pub fn apply_fold(&mut self, fold: &ControlFold) {
|
||||
self.heads = fold.floors.values().cloned().collect();
|
||||
self.banned = fold.banned.clone();
|
||||
|
||||
if let Some(community) = &fold.community {
|
||||
self.relays = community
|
||||
|
||||
Reference in New Issue
Block a user