forked from x/icebergs
add some
This commit is contained in:
parent
329f963a38
commit
f45d784af7
@ -140,6 +140,10 @@ func init() {
|
|||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
}, web.ApiAction(), mdb.ImportantHashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,type,name,help,icons,order,link,space,index,args")), Hand: func(m *ice.Message, arg ...string) {
|
}, web.ApiAction(), mdb.ImportantHashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,type,name,help,icons,order,link,space,index,args")), Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
if m.Option(ice.MSG_USERNAME) == "" && m.Option("code") == "" && mdb.Config(m, "oauth") != "" {
|
||||||
|
m.ProcessOpen(mdb.Config(m, "oauth"))
|
||||||
|
return
|
||||||
|
}
|
||||||
kit.If(m.Option(ice.MSG_USERPOD), func(p string) {
|
kit.If(m.Option(ice.MSG_USERPOD), func(p string) {
|
||||||
m.Cmdy(web.SPACE, p, m.PrefixKey(), ice.Maps{ice.MSG_USERPOD: ""})
|
m.Cmdy(web.SPACE, p, m.PrefixKey(), ice.Maps{ice.MSG_USERPOD: ""})
|
||||||
}, func() {
|
}, func() {
|
||||||
|
@ -110,6 +110,7 @@ func init() {
|
|||||||
m.OptionSimple("user_cmd", "sess_cmd"),
|
m.OptionSimple("user_cmd", "sess_cmd"),
|
||||||
)
|
)
|
||||||
m.Cmd(AGENT, OAUTH, m.Cmdx("web.chat.oauth.client", web.LINK, oauth))
|
m.Cmd(AGENT, OAUTH, m.Cmdx("web.chat.oauth.client", web.LINK, oauth))
|
||||||
|
m.Cmd(web.SPACE, ice.OPS, ctx.CONFIG, "web.chat.header", OAUTH, m.Cmdx("web.chat.oauth.client", web.LINK, oauth))
|
||||||
}},
|
}},
|
||||||
web.SSO: {Name: "sso name*=weixin help*=微信扫码 order=11 env=release,trial,develop wifi", Hand: func(m *ice.Message, arg ...string) {
|
web.SSO: {Name: "sso name*=weixin help*=微信扫码 order=11 env=release,trial,develop wifi", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmd(web.CHAT_HEADER, mdb.CREATE, mdb.TYPE, mdb.PLUGIN, m.OptionSimple(mdb.NAME, mdb.HELP, mdb.ORDER),
|
m.Cmd(web.CHAT_HEADER, mdb.CREATE, mdb.TYPE, mdb.PLUGIN, m.OptionSimple(mdb.NAME, mdb.HELP, mdb.ORDER),
|
||||||
|
@ -40,6 +40,9 @@ func init() {
|
|||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
AGENT: {Name: "agent auto", Help: "代理", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
AGENT: {Name: "agent auto", Help: "代理", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
||||||
chat.HEADER_AGENT: {Hand: func(m *ice.Message, arg ...string) {
|
chat.HEADER_AGENT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
if m.Option(ice.MSG_USERNAME) == "" && mdb.Config(m, "oauth") != "" {
|
||||||
|
m.ProcessOpen(mdb.Config(m, "oauth"))
|
||||||
|
}
|
||||||
kit.If(strings.Index(m.Option(ice.MSG_USERUA), "MicroMessenger") > -1, func() {
|
kit.If(strings.Index(m.Option(ice.MSG_USERUA), "MicroMessenger") > -1, func() {
|
||||||
m.Optionv(mdb.PLUGIN, m.PrefixKey(), mdb.Config(m, web.SPACE))
|
m.Optionv(mdb.PLUGIN, m.PrefixKey(), mdb.Config(m, web.SPACE))
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user