diff --git a/core/chat/grant.go b/core/chat/grant.go index 6178cd74..7a0d62cd 100644 --- a/core/chat/grant.go +++ b/core/chat/grant.go @@ -32,7 +32,7 @@ func init() { return } else if m.Warn(m.Option(ice.MSG_USERNAME) == "", ice.ErrNotLogin) || m.Warn(m.Option(web.SPACE) == "", ice.ErrNotValid, web.SPACE) { return - } else if msg := m.Cmd(web.SPACE, m.Option(web.SPACE)); m.Warn(msg.Append(mdb.TYPE) != aaa.LOGIN, ice.ErrNotFound, m.Option(web.SPACE)) { + } else if msg := m.Cmd(web.SPACE, m.Option(web.SPACE)); m.Warn(msg.Append(mdb.TYPE) == "", ice.ErrNotFound, m.Option(web.SPACE)) { return } else { web.RenderCookie(m, aaa.SessValid(m)) diff --git a/core/chat/header.go b/core/chat/header.go index 08584ac8..8df9573c 100644 --- a/core/chat/header.go +++ b/core/chat/header.go @@ -93,6 +93,10 @@ func init() { m.Cmdy(aaa.EMAIL, aaa.SEND, aaa.FROM, aaa.ADMIN, arg, aaa.CONTENT, nfs.Template(m, "email.html")) }}, aaa.LOGOUT: {Hand: aaa.SessLogout}, + cli.QRCODE: {Hand: func(m *ice.Message, arg ...string) { + m.Push(web.LINK, tcp.PublishLocalhost(m, m.Option(ice.MSG_USERWEB))) + m.EchoQRCode(tcp.PublishLocalhost(m, m.Option(ice.MSG_USERWEB))) + }}, mdb.CREATE: {Name: "create type*=plugin,qrcode,oauth name* icons link order space index args", Hand: func(m *ice.Message, arg ...string) { mdb.HashCreate(m, m.OptionSimple()) }}, mdb.REMOVE: {Hand: func(m *ice.Message, arg ...string) { mdb.HashRemove(m, m.OptionSimple(mdb.NAME)) }}, mdb.MODIFY: {Hand: func(m *ice.Message, arg ...string) { mdb.HashModify(m, m.OptionSimple(mdb.NAME), arg) }},