Fix issue with loading view using the redacted modifier

Also tried to make some adjusmtents to the refresh subscribtion to see
if this fixes bugs people were having

Closes: #119

Changelog-Fixed: Fixed issues when refreshing global view
This commit is contained in:
Sam DuBois
2022-12-22 17:23:55 -07:00
committed by William Casarin
parent 514d9f4201
commit 549cbb9bce
6 changed files with 62 additions and 54 deletions

View File

@@ -274,6 +274,20 @@ class NostrEvent: Codable, Identifiable, CustomStringConvertible, Equatable {
self.tags = tags
self.created_at = Int64(Date().timeIntervalSince1970)
}
/// Intiialization statement used to specificy ID
///
/// This is mainly used for contant and testing data
init(id: String, content: String, pubkey: String, kind: Int = 1, tags: [[String]] = []) {
self.id = id
self.sig = ""
self.content = content
self.pubkey = pubkey
self.kind = kind
self.tags = tags
self.created_at = Int64(Date().timeIntervalSince1970)
}
init(from: NostrEvent, content: String? = nil) {
self.id = from.id