Skip to content

Commit

Permalink
feat: add userename to template
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjani committed Jun 6, 2024
1 parent cce28d0 commit ae92789
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gooseberry/knowledge_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub struct AnnotationTemplate {
pub title: String,
pub incontext: String,
pub highlight: Vec<String>,
pub username: String,
pub display_name: Option<String>,
pub group_name: String,
}
Expand Down Expand Up @@ -66,6 +67,7 @@ impl AnnotationTemplate {
} else {
None
};
let username = annotation.user.to_username();
let mut title = String::from("Untitled document");
if let Some(document) = &annotation.document {
if !document.title.is_empty() {
Expand All @@ -82,6 +84,7 @@ impl AnnotationTemplate {
title,
incontext,
highlight,
username,
display_name,
group_name,
}
Expand Down

0 comments on commit ae92789

Please sign in to comment.