mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 03:26:31 +00:00
[Fixes: #9489] Correctly pass now
in cofx when receiving messages
`now` was not passed anymore in cofx, this fixes the issue. Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
ddbfc78e08
commit
efcb35504d
@ -184,7 +184,7 @@
|
|||||||
:last-message-content-type content-type)})))
|
:last-message-content-type content-type)})))
|
||||||
|
|
||||||
(fx/defn receive-one
|
(fx/defn receive-one
|
||||||
[{:keys [now] :as cofx} message]
|
[cofx message]
|
||||||
(when-let [chat-id (extract-chat-id cofx message)]
|
(when-let [chat-id (extract-chat-id cofx message)]
|
||||||
(let [message-with-chat-id (assoc message :chat-id chat-id)]
|
(let [message-with-chat-id (assoc message :chat-id chat-id)]
|
||||||
(when (add-to-chat? cofx message-with-chat-id)
|
(when (add-to-chat? cofx message-with-chat-id)
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
dedup-id is passed by status-go and is used to deduplicate messages at that layer.
|
dedup-id is passed by status-go and is used to deduplicate messages at that layer.
|
||||||
Once a message has been successfuly processed, that id needs to be sent back
|
Once a message has been successfuly processed, that id needs to be sent back
|
||||||
in order to stop receiving that message"
|
in order to stop receiving that message"
|
||||||
[{:keys [db]} now-in-s filter-chat-id message-js]
|
[{:keys [db] :as cofx} now-in-s filter-chat-id message-js]
|
||||||
(let [blocked-contacts (get db :contacts/blocked #{})
|
(let [blocked-contacts (get db :contacts/blocked #{})
|
||||||
timestamp (.-timestamp (.-message message-js))
|
timestamp (.-timestamp (.-message message-js))
|
||||||
metadata-js (.-metadata message-js)
|
metadata-js (.-metadata message-js)
|
||||||
@ -81,8 +81,7 @@
|
|||||||
sig)
|
sig)
|
||||||
sig
|
sig
|
||||||
timestamp
|
timestamp
|
||||||
{:db db
|
(assoc cofx :metadata metadata)))
|
||||||
:metadata metadata}))
|
|
||||||
(catch :default e nil))))) ; ignore unknown message types
|
(catch :default e nil))))) ; ignore unknown message types
|
||||||
|
|
||||||
(defn- js-obj->seq [obj]
|
(defn- js-obj->seq [obj]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user