aboutsummaryrefslogtreecommitdiffstats
path: root/src/state
diff options
context:
space:
mode:
Diffstat (limited to 'src/state')
-rw-r--r--src/state/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs
index 604f6ae..36dab9d 100644
--- a/src/state/mod.rs
+++ b/src/state/mod.rs
@@ -377,6 +377,16 @@ impl AppState {
*self.closing.borrow()
}
+ /// The kind of this node's document (`document::KIND`, or a set of events where
+ /// one carries its store).
+ pub(crate) fn kind(&self) -> &'static str {
+ #[cfg(feature = "federation")]
+ if self.holding.of_a_set() {
+ return self.holding.kind();
+ }
+ crate::document::KIND
+ }
+
pub(crate) fn local_id(&self) -> &str {
self.transport.local_id()
}