Friends filter for notifications

Changelog-Added: Friends filter for notifications
This commit is contained in:
William Casarin
2023-04-21 14:17:37 -07:00
parent 4c44de9276
commit 9bf8349db6
7 changed files with 264 additions and 27 deletions

View File

@@ -52,6 +52,10 @@ struct Zap {
public let is_anon: Bool
public let private_request: NostrEvent?
var request_ev: NostrEvent {
return private_request ?? self.request.ev
}
public static func from_zap_event(zap_ev: NostrEvent, zapper: String, our_privkey: String?) -> Zap? {
/// Make sure that we only create a zap event if it is authorized by the profile or event
guard zapper == zap_ev.pubkey else {