Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add `embeds` field to comments
Sebastian Martinez committed 1 year ago
commit 6ff895e9a5e0bf5a71907548e2571a26a7406551
parent 2af8538851106394a4f5b93060a96059d9e5f987
2 files changed +5 -0
modified crates/radicle-tauri/bindings/Comment.ts
@@ -11,5 +11,6 @@ export type Comment<T = Never> = {
  reactions: Array<Reaction>;
  replyTo?: string;
  location?: T;
+
  embeds: { name: string; content: string }[];
  resolved: boolean;
};
modified crates/radicle-tauri/src/types/thread.rs
@@ -34,6 +34,8 @@ pub struct Comment<T = cobs::Never> {
    reply_to: Option<cob::thread::CommentId>,
    #[ts(optional)]
    location: Option<T>,
+
    #[ts(type = "{ name: string, content: string }[]")]
+
    embeds: Vec<cob::Embed<cob::Uri>>,
    resolved: bool,
}

@@ -57,6 +59,7 @@ impl Comment<CodeLocation> {
                .collect::<Vec<_>>(),
            reply_to: comment.reply_to(),
            location: comment.location().map(|l| CodeLocation::new(l.clone())),
+
            embeds: comment.embeds().to_vec(),
            resolved: comment.is_resolved(),
        }
    }
@@ -82,6 +85,7 @@ impl Comment {
                .collect::<Vec<_>>(),
            reply_to: comment.reply_to(),
            location: None,
+
            embeds: comment.embeds().to_vec(),
            resolved: comment.is_resolved(),
        }
    }