query: add longform kind, add to home filter

This commit is contained in:
William Casarin
2023-06-01 11:46:00 -07:00
parent 6ca9bda01e
commit 41de715067
4 changed files with 5 additions and 5 deletions

View File

@@ -106,6 +106,7 @@ class HomeModel {
switch kind { switch kind {
case .chat: fallthrough case .chat: fallthrough
case .longform: fallthrough
case .text: case .text:
handle_text_event(sub_id: sub_id, ev) handle_text_event(sub_id: sub_id, ev)
case .contacts: case .contacts:
@@ -406,8 +407,7 @@ class HomeModel {
// TODO: separate likes? // TODO: separate likes?
var home_filter_kinds: [NostrKind] = [ var home_filter_kinds: [NostrKind] = [
.text, .text, .longform, .boost
.boost
] ]
if !damus_state.settings.onlyzaps_mode { if !damus_state.settings.onlyzaps_mode {
home_filter_kinds.append(.like) home_filter_kinds.append(.like)

View File

@@ -69,8 +69,7 @@ class ProfileModel: ObservableObject, Equatable {
} }
func subscribe() { func subscribe() {
var text_filter = NostrFilter(kinds: [.text, .chat]) var text_filter = NostrFilter(kinds: [.text, .longform])
var profile_filter = NostrFilter(kinds: [.contacts, .metadata, .boost]) var profile_filter = NostrFilter(kinds: [.contacts, .metadata, .boost])
profile_filter.authors = [pubkey] profile_filter.authors = [pubkey]

View File

@@ -68,7 +68,7 @@ class NostrEvent: Codable, Identifiable, CustomStringConvertible, Equatable, Has
let content: String let content: String
var is_textlike: Bool { var is_textlike: Bool {
return kind == 1 || kind == 42 return kind == 1 || kind == 42 || kind == 30023
} }
var too_big: Bool { var too_big: Bool {

View File

@@ -20,6 +20,7 @@ enum NostrKind: Int, Codable {
case channel_meta = 41 case channel_meta = 41
case chat = 42 case chat = 42
case list = 30000 case list = 30000
case longform = 30023
case zap = 9735 case zap = 9735
case zap_request = 9734 case zap_request = 9734
case nwc_request = 23194 case nwc_request = 23194