Implement NIP04: Encrypted Direct Messages

Closes #5

This adds encrypted direct message support to damus

Changelog-Added: Implement NIP04: Encrypted Direct Messages
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-06-30 07:16:48 -07:00
parent 0744156c0c
commit c122035851
24 changed files with 892 additions and 228 deletions

View File

@@ -147,8 +147,8 @@ func interpret_event_refs(blocks: [Block], tags: [[String]]) -> [EventRef] {
}
func event_is_reply(_ ev: NostrEvent) -> Bool {
return ev.event_refs.contains { evref in
func event_is_reply(_ ev: NostrEvent, privkey: String?) -> Bool {
return ev.event_refs(privkey).contains { evref in
return evref.is_reply != nil
}
}