File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1
1
function browse ( params , context ) {
2
2
var url ;
3
3
4
+ if ( params . metadata && params . metadata . url
5
+ && params . metadata . url !== "undefined" && params . metadata . url != "" ) {
6
+ url = params . metadata . url ;
7
+ }
8
+
4
9
if ( params . url && params . url !== "undefined" && params . url != "" ) {
5
10
url = params . url ;
6
- if ( ! / ^ [ a - z A - Z - _ ] + : / . test ( url ) ) {
7
- url = 'http://' + url ;
8
- }
11
+ }
12
+
13
+ if ( url && ! / ^ [ a - z A - Z - _ ] + : / . test ( url ) ) {
14
+ url = 'http://' + url ;
9
15
}
10
16
11
17
return {
Original file line number Diff line number Diff line change 164
164
; :check-and-load-commands!
165
165
(let [params
166
166
{:command command
167
- :chat-id jail-id}
167
+ :chat-id chat-id
168
+ :jail-id jail-id}
168
169
169
170
on-send-params
170
171
(merge params
230
231
(handlers/side-effect!
231
232
(fn [{:keys [contacts] :as db}
232
233
[_ {{:keys [command metadata args] :as c} :command
233
- :keys [message-id chat-id data-type after]}]]
234
+ :keys [message-id chat-id jail-id data-type after]}]]
234
235
(let [{:keys [dapp? dapp-url name]} (get contacts chat-id)
235
236
message-id (random/id )
236
237
metadata (merge metadata
244
245
:created-at (time/now-ms )
245
246
:id message-id
246
247
:chat-id chat-id
247
- :jail-id ( or ( :bot command) chat -id) }
248
+ :jail-id jail -id}
248
249
request-data {:message-id message-id
249
250
:chat-id chat-id
251
+ :jail-id jail-id
250
252
:content {:command (:name command)
251
253
:params (assoc params :metadata metadata)
252
254
:type (:type command)}
Original file line number Diff line number Diff line change 199
199
(reg-handler ::add-commands
200
200
[(after save-commands-js!)
201
201
(after save-commands!)
202
- (after #(dispatch [:check-and-open-dapp! ]))
203
202
(after #(dispatch [:update-suggestions ]))
204
203
(after (fn [_ [id]]
205
204
(dispatch [:invoke-commands-loading-callbacks id])
You can’t perform that action at this time.
0 commit comments