From db3dcdb474934618604c765553398665efa28673 Mon Sep 17 00:00:00 2001 From: shaoying Date: Fri, 6 Aug 2021 09:13:13 +0800 Subject: [PATCH] opt some --- lib/user.js | 6 +++--- plugin/state.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/user.js b/lib/user.js index 516ffc94..b79991d3 100644 --- a/lib/user.js +++ b/lib/user.js @@ -84,10 +84,10 @@ Volcanos("user", {help: "用户操作", agent: { return action }, share: function(can, msg, cmd) { - can.run(msg._event, cmd||[ctx.ACTION, "share"], function(msg) { + can.run(msg._event, cmd||[ctx.ACTION, chat.SHARE], function(msg) { can.user.toast(can, {height: 300, width: 500, - title: msg.Append("name"), duration: -1, - content: msg.Append("text"), action: ["close"], + title: msg.Append(kit.MDB_NAME), duration: -1, + content: msg.Append(kit.MDB_TEXT), action: [cli.CLOSE], }) }) }, diff --git a/plugin/state.js b/plugin/state.js index ca9d784f..dbb355b8 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -105,6 +105,7 @@ Volcanos("onaction", {help: "交互操作", list: [ }, "生成链接": function(event, can) { var meta = can.Conf() var args = can.Option(); args._path = "/chat/cmd/"+(meta.index||can.core.Keys(meta.ctx, meta.cmd)) + args._path == "/chat/cmd/web.wiki.word" && (args = {_path: "/chat/cmd/"+args.path}) var msg = can.request(event, {link: can.user.MergeURL(can, args)}) can.search(event, ["Header.onaction.share"]) },