Fix group commands
This commit is contained in:
parent
c99af08c4f
commit
d98f3846fd
|
@ -245,7 +245,7 @@
|
|||
metadata
|
||||
args]
|
||||
:as content} :content
|
||||
:keys [chat-id jail-id data-type event-after-creator message-id current-time]}]
|
||||
:keys [chat-id group-id jail-id data-type event-after-creator message-id current-time]}]
|
||||
(let [{:keys [dapp? dapp-url name]} (get contacts chat-id)
|
||||
metadata (merge metadata
|
||||
(when dapp?
|
||||
|
@ -267,6 +267,7 @@
|
|||
|
||||
request-data {:message-id message-id
|
||||
:chat-id chat-id
|
||||
:group-id group-id
|
||||
:jail-id (or owner-id jail-id)
|
||||
:content {:command (:name command)
|
||||
:scope-bitmask (:scope-bitmask command)
|
||||
|
@ -290,9 +291,11 @@
|
|||
If it's normal command instead (determined by nil response to `:on-send` jail request),
|
||||
processing continues by requesting command preview before actually sending the command
|
||||
message."
|
||||
[{:keys [current-chat-id] :as db} {{:keys [bot]} :command :as content} message-id current-time]
|
||||
[{:keys [current-chat-id chats] :as db} {{:keys [bot]} :command :as content} message-id current-time]
|
||||
(let [params-template {:content content
|
||||
:chat-id current-chat-id
|
||||
:group-id (when (get-in chats [current-chat-id :group-chat])
|
||||
current-chat-id)
|
||||
:jail-id (or bot current-chat-id)
|
||||
:message-id message-id
|
||||
:current-time current-time}
|
||||
|
|
Loading…
Reference in New Issue