#2185: After upgrade faucet, send and location messages are shown as plain text, request is shown without a text
This commit is contained in:
parent
74e81f7faf
commit
b6f7cc8629
|
@ -24,26 +24,26 @@
|
|||
(defn request-command-message-data
|
||||
"Requests command message data from jail"
|
||||
[db
|
||||
{{command-name :command
|
||||
{{command-name :command
|
||||
content-command-name :content-command
|
||||
:keys [content-command-scope
|
||||
scope
|
||||
params
|
||||
type
|
||||
bot]} :content
|
||||
:keys [chat-id jail-id group-id] :as message}
|
||||
:keys [content-command-scope scope params type bot]} :content
|
||||
:keys [chat-id jail-id group-id] :as message}
|
||||
data-type]
|
||||
(let [{:keys [chats]
|
||||
:accounts/keys [current-account-id]
|
||||
:contacts/keys [contacts]} db
|
||||
jail-id (or bot jail-id chat-id)
|
||||
jail-id (if (get-in chats [jail-id :group-chat])
|
||||
(get-in chats [jail-id :possible-commands (keyword command-name) :owner-id])
|
||||
jail-id)]
|
||||
jail-id (or bot jail-id chat-id)
|
||||
jail-command-name (or content-command-name command-name)
|
||||
;; here we're trying to use the default scope if there is no other scope provided
|
||||
default-command-scope (-> (get-in contacts [jail-id :commands (keyword jail-command-name)])
|
||||
first
|
||||
:scope)]
|
||||
(if (get-in contacts [jail-id :commands-loaded?])
|
||||
(let [path [(if (= :response (keyword type)) :responses :commands)
|
||||
[(if content-command-name content-command-name command-name)
|
||||
(commands-model/scope->bit-mask (or scope content-command-scope))]
|
||||
[jail-command-name
|
||||
(commands-model/scope->bit-mask (or scope
|
||||
content-command-scope
|
||||
default-command-scope))]
|
||||
data-type]
|
||||
to (get-in contacts [chat-id :address])
|
||||
jail-params {:parameters params
|
||||
|
|
|
@ -37,4 +37,5 @@
|
|||
handler-data/schema])
|
||||
|
||||
(defn migration [old-realm new-realm]
|
||||
(log/debug "migrating v15 account database: " old-realm new-realm))
|
||||
(log/debug "migrating v15 account database: " old-realm new-realm)
|
||||
(contact/migration old-realm new-realm))
|
Loading…
Reference in New Issue