optimized id matching function
doesn't need to create a copy of the id Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
5b1f0c4714
commit
208b3331ca
@@ -59,7 +59,7 @@ func insert_uniq_sorted_event(events: inout [NostrEvent], new_ev: NostrEvent, cm
|
||||
|
||||
for event in events {
|
||||
// don't insert duplicate events
|
||||
if new_ev.id == event.id {
|
||||
if new_ev.id_matches(other: event) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user