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

View File

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

View File

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

View File

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