aboutsummaryrefslogtreecommitdiff
path: root/backend/notes/note.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/notes/note.go')
-rw-r--r--backend/notes/note.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/notes/note.go b/backend/notes/note.go
index 591caff..569188c 100644
--- a/backend/notes/note.go
+++ b/backend/notes/note.go
@@ -26,6 +26,15 @@ type Facet struct {
Value string `json:"value"` // the link destination, whether url, profile or tag
}
+func MissingNote(uri string) *Note {
+ return &Note{
+ URI: uri,
+ AuthorDID: "MISSING",
+ Text: "This post could not be fetched. It may have been deleted.",
+ CreatedAt: time.Time{},
+ }
+}
+
func isChainContained(smallChain, bigChain []string) bool {
if len(smallChain) > len(bigChain) {
return false