mirror of
git://jb55.com/damus
synced 2024-09-30 00:40:45 +00:00
note: add is_quote_repost helper
This will be used for excluding quote repost notes from threads Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
770a845b36
commit
1339ec3ded
@ -280,6 +280,13 @@ extension NdbNote {
|
||||
return kind == 1 || kind == 42 || kind == 30023
|
||||
}
|
||||
|
||||
var is_quote_repost: NoteId? {
|
||||
guard kind == 1, let quoted_note_id = referenced_quote_ids.first else {
|
||||
return nil
|
||||
}
|
||||
return quoted_note_id.note_id
|
||||
}
|
||||
|
||||
var known_kind: NostrKind? {
|
||||
return NostrKind.init(rawValue: kind)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user