diff --git a/damus/Nostr/NostrEvent.swift b/damus/Nostr/NostrEvent.swift index befd5ee4..0820b4cd 100644 --- a/damus/Nostr/NostrEvent.swift +++ b/damus/Nostr/NostrEvent.swift @@ -82,7 +82,7 @@ class NostrEvent: Codable, Identifiable, CustomStringConvertible, Equatable, Has } var too_big: Bool { - return self.content.underestimatedCount > 16000 + return self.content.utf8.count > 16000 } var should_show_event: Bool { diff --git a/damus/Nostr/RelayConnection.swift b/damus/Nostr/RelayConnection.swift index 726a603b..b809de6b 100644 --- a/damus/Nostr/RelayConnection.swift +++ b/damus/Nostr/RelayConnection.swift @@ -89,7 +89,7 @@ final class RelayConnection: WebSocketDelegate { self.isConnected = false case .text(let txt): - if txt.underestimatedCount > 2000 { + if txt.utf8.count > 2000 { DispatchQueue.global(qos: .default).async { if let ev = decode_nostr_event(txt: txt) { DispatchQueue.main.async {