From 94bd1942874838528207b686ff071b805ca2926b Mon Sep 17 00:00:00 2001 From: prprhyt Date: Sat, 1 Jul 2023 04:08:41 +0900 Subject: [PATCH] Added event id validation --- damus/Models/HomeModel.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift index 6581f731..8ccd1da1 100644 --- 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 {