Use the correct group chat id

This commit is contained in:
janherich 2017-12-15 13:42:56 +01:00
parent f3519b975c
commit c8168e9ff0
No known key found for this signature in database
GPG Key ID: C23B473AFBE94D13
1 changed files with 10 additions and 9 deletions

View File

@ -121,13 +121,12 @@
(fn [processed-message]
(processed-messages/save processed-message)))
(defn system-message
([message-id timestamp content]
(defn system-message [message-id timestamp content]
{:from "system"
:message-id message-id
:timestamp timestamp
:content content
:content-type constants/text-content-type}))
:content-type constants/text-content-type})
(re-frame/reg-fx
::participant-removed-from-group-message
@ -499,7 +498,9 @@
{:keys [group-id timestamp message-id]} :payload}]]
(when (and (not= current-public-key from)
chats-is-active-and-timestamp)
{::participant-left-group-message {:group-id group-id :from from :message-id message-id
{::participant-left-group-message {:chat-id group-id
:from from
:message-id message-id
:timestamp timestamp}
::chats-remove-contact [group-id from]
:db (update-in db [:chats group-id :contacts]