commit 94bd1942874838528207b686ff071b805ca2926b
parent 97f10e865f4fd71b77c2f11eff021e5a9ec06fe6
Author: prprhyt <prprhyt@gmail.com>
Date: Sat, 1 Jul 2023 04:08:41 +0900
Added event id validation
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift
@@ -753,6 +753,9 @@ func process_metadata_profile(our_pubkey: String, profiles: Profiles, profile: P
}
func guard_valid_event(events: EventCache, ev: NostrEvent, callback: @escaping () -> Void) {
+ guard ev.id==calculate_event_id(ev: ev) else {
+ return
+ }
let validated = events.is_event_valid(ev.id)
switch validated {