Revert "mute: migrate Lists.swift to use new MuteItem"

This reverts commit 0f05123ef8.
This commit is contained in:
William Casarin
2024-01-25 12:10:22 -08:00
parent 66fd1dd444
commit a4253a613c
11 changed files with 82 additions and 91 deletions

View File

@@ -798,15 +798,3 @@ func to_reaction_emoji(ev: NostrEvent) -> String? {
}
}
extension NostrEvent {
/// The mutelist for a given event
///
/// If the event is not a mutelist it will return `nil`.
var mute_list: Set<MuteItem>? {
if (self.kind == NostrKind.list_deprecated.rawValue && self.referenced_params.contains(where: { p in p.param.matches_str("mute") })) || self.kind == NostrKind.mute_list.rawValue {
return Set(self.referenced_mute_items)
} else {
return nil
}
}
}

View File

@@ -17,8 +17,7 @@ enum NostrKind: UInt32, Codable {
case boost = 6
case like = 7
case chat = 42
case mute_list = 10000
case list_deprecated = 30000
case list = 30000
case longform = 30023
case zap = 9735
case zap_request = 9734