This commit is contained in:
Roman Volosovskyi 2017-05-02 16:25:00 +03:00
parent 561c66084c
commit 72d06426d8
2 changed files with 6 additions and 7 deletions

View File

@ -209,10 +209,9 @@
(when update-db
(dispatch [:update-bot-db {:bot chat-id
:db update-db}]))
(when markup
(dispatch [:suggestions-handler (assoc params
:result data
:default-db default-db)]))
(dispatch [:suggestions-handler (assoc params
:result data
:default-db default-db)])
(doseq [message log-messages]
(let [{:keys [message type]} message]
(when (or (not= type "debug") js/goog.DEBUG)

View File

@ -40,10 +40,10 @@
(let [{:keys [markup]} (get-in result [:result :returned])
{:keys [dapp? dapp-url]} (get contacts chat-id)
path (if command
[:chats chat-id :parameter-boxes (:name command) parameter-index :hiccup]
[:chats chat-id :parameter-boxes :message :hiccup])]
[:chats chat-id :parameter-boxes (:name command) parameter-index]
[:chats chat-id :parameter-boxes :message])]
(when-not (= (get-in db path) markup)
(dispatch [:set-in path markup])
(dispatch [:set-in path (when markup {:hiccup markup})])
(when default-db
(dispatch [:update-bot-db {:bot chat-id
:db default-db}])))))