Protect against duplicate messages

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
janherich 2018-05-30 16:57:51 +02:00 committed by Igor Mandrigin
parent 33ad919508
commit e59ffc905d
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,8 @@
::received-message ::received-message
message-model/receive-interceptors message-model/receive-interceptors
(fn [cofx [message]] (fn [cofx [message]]
(message-model/receive message cofx))) (when (message-model/add-to-chat? cofx message)
(message-model/receive message cofx))))
(re-frame.core/reg-fx (re-frame.core/reg-fx
:chat-received-message/add-fx :chat-received-message/add-fx