Offline inbox support for public chats
- Add `allowP2P` flag to group messages filter - Remove `to` option from historic messages whisper request
This commit is contained in:
parent
fecdef4124
commit
9ca54e9adc
|
@ -2,6 +2,7 @@
|
||||||
(:require
|
(:require
|
||||||
[status-im.protocol.web3.delivery :as d]
|
[status-im.protocol.web3.delivery :as d]
|
||||||
[status-im.protocol.web3.utils :as u]
|
[status-im.protocol.web3.utils :as u]
|
||||||
|
[status-im.utils.config :as config]
|
||||||
[cljs.spec.alpha :as s]
|
[cljs.spec.alpha :as s]
|
||||||
[taoensso.timbre :refer-macros [debug]]
|
[taoensso.timbre :refer-macros [debug]]
|
||||||
[status-im.protocol.validation :refer-macros [valid?]]
|
[status-im.protocol.validation :refer-macros [valid?]]
|
||||||
|
@ -136,9 +137,14 @@
|
||||||
(fn [key-id]
|
(fn [key-id]
|
||||||
(f/add-filter!
|
(f/add-filter!
|
||||||
web3
|
web3
|
||||||
|
(if config/offline-inbox-enabled?
|
||||||
{:topics [f/status-topic]
|
{:topics [f/status-topic]
|
||||||
:key key-id
|
:key key-id
|
||||||
|
:allowP2P true
|
||||||
:type :sym}
|
:type :sym}
|
||||||
|
{:topics [f/status-topic]
|
||||||
|
:key key-id
|
||||||
|
:type :sym})
|
||||||
(l/message-listener {:web3 web3
|
(l/message-listener {:web3 web3
|
||||||
:identity identity
|
:identity identity
|
||||||
:callback callback
|
:callback callback
|
||||||
|
|
|
@ -47,8 +47,7 @@
|
||||||
:params [{:peer enode
|
:params [{:peer enode
|
||||||
:topic topic
|
:topic topic
|
||||||
:symKeyID sym-key-id
|
:symKeyID sym-key-id
|
||||||
:from 0
|
:from 0}]}
|
||||||
:to 1612505820}]}
|
|
||||||
payload (.stringify js/JSON (clj->js args))]
|
payload (.stringify js/JSON (clj->js args))]
|
||||||
(log/info "offline inbox: request-messages request")
|
(log/info "offline inbox: request-messages request")
|
||||||
(log/info "offline inbox: request-messages args" (pr-str args))
|
(log/info "offline inbox: request-messages args" (pr-str args))
|
||||||
|
|
Loading…
Reference in New Issue