damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 5bac6405b9db7931c07d097cb929ce7acf3bdc27
parent 3e3b689647181464639438d912016cdd104ded24
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 30 Jun 2023 06:41:30 -0700

validation: make sure to run on a detached task

so we don't do sig validation on the main thread accidentally

Diffstat:
Mdamus/Models/HomeModel.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift @@ -752,7 +752,7 @@ func guard_valid_event(events: EventCache, ev: NostrEvent, callback: @escaping ( switch validated { case .unknown: - Task { + Task.detached(priority: .medium) { let result = validate_event(ev: ev) DispatchQueue.main.async {