fix #1124
This commit is contained in:
parent
6a20f9040c
commit
1d532fc820
|
@ -203,8 +203,9 @@
|
||||||
(u/side-effect!
|
(u/side-effect!
|
||||||
(fn [_ [_ {:keys [chat-id] :as params} {:keys [result] :as data}]]
|
(fn [_ [_ {:keys [chat-id] :as params} {:keys [result] :as data}]]
|
||||||
(let [{:keys [returned context]} result
|
(let [{:keys [returned context]} result
|
||||||
{:keys [markup text-message]} returned
|
{:keys [markup text-message err]} returned
|
||||||
{:keys [log-messages update-db default-db]} context]
|
{:keys [log-messages update-db default-db]} context
|
||||||
|
content (or err text-message)]
|
||||||
(when update-db
|
(when update-db
|
||||||
(dispatch [:update-bot-db {:bot chat-id
|
(dispatch [:update-bot-db {:bot chat-id
|
||||||
:db update-db}]))
|
:db update-db}]))
|
||||||
|
@ -223,10 +224,10 @@
|
||||||
:chat-id chat-id
|
:chat-id chat-id
|
||||||
:from chat-id
|
:from chat-id
|
||||||
:to "me"}]))))
|
:to "me"}]))))
|
||||||
(when text-message
|
(when content
|
||||||
(dispatch [:received-message
|
(dispatch [:received-message
|
||||||
{:message-id (random/id)
|
{:message-id (random/id)
|
||||||
:content (str text-message)
|
:content (str content)
|
||||||
:content-type text-content-type
|
:content-type text-content-type
|
||||||
:outgoing false
|
:outgoing false
|
||||||
:chat-id chat-id
|
:chat-id chat-id
|
||||||
|
|
Loading…
Reference in New Issue