mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
Use Did in a bunch more places
Instead of showing just public keys we need to show the fully qualified spec for a NID which is prefixed by `did🔑` While we want to maintain `Author` and `ActorId` for internal use. Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
committed by
Alexis Sellier
parent
7e9b9c944b
commit
3cf1accddd
@@ -9,8 +9,7 @@ use serde_json::{json, Value};
|
||||
use radicle::cob::issue::{Issue, IssueId};
|
||||
use radicle::cob::patch::{Patch, PatchId};
|
||||
use radicle::cob::thread::{self, CommentId};
|
||||
use radicle::cob::{OpId, Timestamp};
|
||||
use radicle::identity::PublicKey;
|
||||
use radicle::cob::{Author, OpId, Timestamp};
|
||||
use radicle_surf::blob::Blob;
|
||||
use radicle_surf::tree::Tree;
|
||||
use radicle_surf::{Commit, Stats};
|
||||
@@ -130,11 +129,6 @@ fn name_in_path(path: &str) -> &str {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Author {
|
||||
id: PublicKey,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct Comment {
|
||||
@@ -156,9 +150,7 @@ impl<'a> FromIterator<(&'a CommentId, &'a thread::Comment)> for Comments {
|
||||
for (id, comment) in iter {
|
||||
comments.push(Comment {
|
||||
id: id.to_owned(),
|
||||
author: Author {
|
||||
id: comment.author(),
|
||||
},
|
||||
author: comment.author().into(),
|
||||
body: comment.body().to_owned(),
|
||||
reactions: [],
|
||||
timestamp: comment.timestamp(),
|
||||
|
||||
Reference in New Issue
Block a user