Update nostr-sdk and adapt to new EventBuilder API
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Rust / build (macos-latest, stable) (pull_request) Waiting to run
Rust / build (ubuntu-latest, stable) (pull_request) Waiting to run
Rust / build (windows-latest, stable) (pull_request) Waiting to run
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Rust / build (macos-latest, stable) (pull_request) Waiting to run
Rust / build (ubuntu-latest, stable) (pull_request) Waiting to run
Rust / build (windows-latest, stable) (pull_request) Waiting to run
This commit is contained in:
@@ -154,7 +154,8 @@ impl Inbox {
|
||||
me: PublicKey,
|
||||
state: &InboxReadState,
|
||||
) -> Result<(), Error> {
|
||||
let event = EventBuilder::new(Kind::ApplicationSpecificData, serde_json::to_string(state)?)
|
||||
let event = EventBuilder::new(Kind::ApplicationSpecificData)
|
||||
.content(serde_json::to_string(state)?)
|
||||
.tags([Tag::identifier(Self::inbox_state_d_tag(me))])
|
||||
.finalize(&Keys::generate())?;
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ mod tests {
|
||||
fn announcement(secret: &str, id: &str) -> Announcement {
|
||||
let keys = Keys::new(SecretKey::from_hex(secret).expect("secret"));
|
||||
let tag = Tag::parse(vec!["d", id]).expect("tag");
|
||||
let event = EventBuilder::new(Kind::GitRepoAnnouncement, "")
|
||||
let event = EventBuilder::new(Kind::GitRepoAnnouncement)
|
||||
.tags(vec![tag])
|
||||
.finalize(&keys)
|
||||
.expect("signed");
|
||||
|
||||
@@ -1134,7 +1134,7 @@ impl RepoStore {
|
||||
return;
|
||||
};
|
||||
|
||||
let builder = EventBuilder::new(status.kind(), "").tags([
|
||||
let builder = EventBuilder::new(status.kind()).tags([
|
||||
root_ref,
|
||||
Tag::public_key(addr.public_key()),
|
||||
Tag::public_key(root.pubkey),
|
||||
@@ -1508,7 +1508,10 @@ where
|
||||
tags.push(tag);
|
||||
}
|
||||
|
||||
let builder = EventBuilder::new(Kind::GitPatch, part.clone()).tags(tags);
|
||||
let builder = EventBuilder::new(Kind::GitPatch)
|
||||
.content(part.clone())
|
||||
.tags(tags);
|
||||
|
||||
let event = builder.finalize_async(signer).await?;
|
||||
let output = client.send_event(&event).broadcast().await?;
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ impl SyncState {
|
||||
);
|
||||
}
|
||||
|
||||
EventBuilder::new(Kind::RepoState, "").tags(tags)
|
||||
EventBuilder::new(Kind::RepoState).tags(tags)
|
||||
}
|
||||
|
||||
pub fn parse(event: &Event) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user