add send and publish

This commit is contained in:
2026-09-30 09:50:49 +07:00
parent c6f7956dff
commit ee9a852a8f
3 changed files with 289 additions and 11 deletions
+8 -3
View File
@@ -349,7 +349,9 @@ impl Community {
}
fn start_round(&mut self, channel: ChannelId, intent: Intent, cx: &mut Context<Self>) {
let client = NostrRegistry::global(cx).read(cx).client();
let nostr = NostrRegistry::global(cx);
let client = nostr.read(cx).client();
let held = self.held_keys(&channel);
let relays = self.state.relays.clone();
let pages = self.pages.clone();
@@ -498,7 +500,8 @@ impl Community {
/// Write the local state document out.
fn persist(&mut self, cx: &Context<Self>) {
let client = NostrRegistry::global(cx).read(cx).client();
let nostr = NostrRegistry::global(cx);
let client = nostr.read(cx).client();
let state = self.state.clone();
let task = cx.background_spawn(async move {
@@ -520,7 +523,9 @@ impl Community {
limit: usize,
cx: &App,
) -> Task<Result<Timeline>> {
let client = NostrRegistry::global(cx).read(cx).client();
let nostr = NostrRegistry::global(cx);
let client = nostr.read(cx).client();
let channel = *channel;
let owner = self.state.owner;
let community_id = self.state.id;