diff --git a/base/web/story.go b/base/web/story.go index e071007a..a64b3972 100644 --- a/base/web/story.go +++ b/base/web/story.go @@ -264,10 +264,10 @@ func _story_catch(m *ice.Message, arg ...string) { _story_add(m, arg...) } func _story_add(m *ice.Message, arg ...string) { - if arg[3] == "" || m.Richs(ice.WEB_CACHE, nil, arg[3], func(key string, value map[string]interface{}) { + if len(arg) > 3 && (arg[3] == "" || m.Richs(ice.WEB_CACHE, nil, arg[3], func(key string, value map[string]interface{}) { // 复用缓存 arg[3] = key - }) == nil { + }) == nil) { // 添加缓存 m.Cmdy(ice.WEB_CACHE, arg) arg = []string{arg[0], m.Append("type"), m.Append("name"), m.Append("data")} diff --git a/core/chat/chat.go b/core/chat/chat.go index 7970699e..ce8a7b3a 100644 --- a/core/chat/chat.go +++ b/core/chat/chat.go @@ -187,6 +187,10 @@ var Index = &ice.Context{Name: "chat", Help: "聊天中心", // 登录检查 if m.Warn(!m.Options(ice.MSG_USERNAME), "not login") { + if m.Option("share") != "" { + m.Option(ice.MSG_USERNAME, "void") + return + } m.Render("status", 401, "not login") m.Option(ice.MSG_USERURL, "") return