nostrdb: fix profiles not updating
Send relay pool events to nostrdb as well Whenever we send events to relays, make sure we send them to nostrdb at the same time. Changelog-Fixed: Fix profile not updating
This commit is contained in:
@@ -216,6 +216,16 @@ class RelayPool {
|
|||||||
func send_raw(_ req: NostrRequestType, to: [String]? = nil, skip_ephemeral: Bool = true) {
|
func send_raw(_ req: NostrRequestType, to: [String]? = nil, skip_ephemeral: Bool = true) {
|
||||||
let relays = to.map{ get_relays($0) } ?? self.relays
|
let relays = to.map{ get_relays($0) } ?? self.relays
|
||||||
|
|
||||||
|
// send to local relay (nostrdb)
|
||||||
|
switch req {
|
||||||
|
case .typical(let r):
|
||||||
|
if let rstr = make_nostr_req(r) {
|
||||||
|
ndb.process_client_event(rstr)
|
||||||
|
}
|
||||||
|
case .custom(let string):
|
||||||
|
ndb.process_client_event(string)
|
||||||
|
}
|
||||||
|
|
||||||
for relay in relays {
|
for relay in relays {
|
||||||
if req.is_read && !(relay.descriptor.info.read ?? true) {
|
if req.is_read && !(relay.descriptor.info.read ?? true) {
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user