Load profiles everywhere

Fixes: #11
Changelog-Fixed: Missing profiles are now loaded everywhere
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-08-04 20:42:18 -07:00
parent 17f87d5438
commit 5c62a06618
6 changed files with 98 additions and 17 deletions
+3 -2
View File
@@ -10,7 +10,7 @@ import Foundation
enum NostrResponse: Decodable {
case event(String, NostrEvent)
case notice(String)
case eose
case eose(String)
init(from decoder: Decoder) throws {
var container = try decoder.unkeyedContainer()
@@ -34,7 +34,8 @@ enum NostrResponse: Decodable {
self = .notice(msg)
return
} else if typ == "EOSE" {
self = .eose
let sub_id = try container.decode(String.self)
self = .eose(sub_id)
return
}