send_filters refactor

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-05-14 15:35:34 -07:00
parent 040ffdf9f5
commit 8da251dc88
11 changed files with 129 additions and 36 deletions

View File

@@ -13,6 +13,7 @@ class SearchModel: ObservableObject {
let pool: RelayPool
var search: NostrFilter
let sub_id = UUID().description
let limit: UInt32 = 500
init(pool: RelayPool, search: NostrFilter) {
self.pool = pool
@@ -21,7 +22,7 @@ class SearchModel: ObservableObject {
func subscribe() {
// since 1 month
search.since = Int64(Date.now.timeIntervalSince1970) - 2629800 * 1
search.limit = self.limit
search.kinds = [1,5,7]
//likes_filter.ids = ref_events.referenced_ids!