fix #1469 chat: location is shown as plaintext

This commit is contained in:
Herich 2017-08-03 00:28:13 +02:00 committed by Roman Volosovskyi
parent abafa3308a
commit d9800fe9a7
1 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,9 @@
result' (if (:markup result)
(update result :markup cu/generate-hiccup)
result)]
(dispatch [:set-in [:message-data data-type message-id] result'])
;; don't fill message data with nil results
(when result'
(dispatch [:set-in [:message-data data-type message-id] result']))
(when (and result (= :preview data-type))
;; update message in realm with serialized preview
(messages/update {:message-id message-id