From c8168e9ff004e0bf523e27e039317b344030d9bf Mon Sep 17 00:00:00 2001 From: janherich Date: Fri, 15 Dec 2017 13:42:56 +0100 Subject: [PATCH] Use the correct group chat id --- src/status_im/protocol/handlers.cljs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/status_im/protocol/handlers.cljs b/src/status_im/protocol/handlers.cljs index 520559fa44..eae440cc74 100644 --- a/src/status_im/protocol/handlers.cljs +++ b/src/status_im/protocol/handlers.cljs @@ -121,13 +121,12 @@ (fn [processed-message] (processed-messages/save processed-message))) -(defn system-message - ([message-id timestamp content] - {:from "system" - :message-id message-id - :timestamp timestamp - :content content - :content-type constants/text-content-type})) +(defn system-message [message-id timestamp content] + {:from "system" + :message-id message-id + :timestamp timestamp + :content content + :content-type constants/text-content-type}) (re-frame/reg-fx ::participant-removed-from-group-message @@ -499,8 +498,10 @@ {: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 - :timestamp timestamp} + {::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] #(remove (fn [{:keys [identity]}]