From 8d1374149c3f3fb7022610dd7844bf32fdca3e5e Mon Sep 17 00:00:00 2001 From: shy Date: Wed, 4 Sep 2024 07:54:59 +0800 Subject: [PATCH] add some --- core/chat/header.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/chat/header.go b/core/chat/header.go index e98e460c..6c36c18c 100644 --- a/core/chat/header.go +++ b/core/chat/header.go @@ -140,9 +140,11 @@ 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) { - if m.Option(ice.MSG_USERNAME) == "" && m.Option("code") == "" && mdb.Config(m, "oauth") != "" { - m.ProcessOpen(mdb.Config(m, "oauth")) - return + if kit.Contains(m.Option(ice.MSG_USERUA), "MicroMessenger") { + 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) { m.Cmdy(web.SPACE, p, m.PrefixKey(), ice.Maps{ice.MSG_USERPOD: ""})