Clear :last-message when clearing chat history. Fixes #212
This commit is contained in:
parent
016fe90abe
commit
fc7cc1d795
|
@ -56,7 +56,9 @@
|
|||
|
||||
(defn clear-messages
|
||||
[{:keys [current-chat-id] :as db} _]
|
||||
(assoc-in db [:chats current-chat-id :messages] '()))
|
||||
(-> db
|
||||
(assoc-in [:chats current-chat-id :messages] '())
|
||||
(assoc-in [:chats current-chat-id :last-message] nil)))
|
||||
|
||||
(register-handler :clear-history
|
||||
(after delete-messages!)
|
||||
|
|
Loading…
Reference in New Issue