From c676c9d024cb867dbe7d8a9aac45fb98e60109fe Mon Sep 17 00:00:00 2001 From: harveyshao Date: Tue, 9 Aug 2022 14:34:32 +0800 Subject: [PATCH] opt some --- base/web/option.go | 3 +++ meta.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/base/web/option.go b/base/web/option.go index 575bbd10..9dece906 100644 --- a/base/web/option.go +++ b/base/web/option.go @@ -23,6 +23,9 @@ func Upload(m *ice.Message) []string { // hash name size return up } func PushNotice(m *ice.Message, arg ...ice.Any) { + if m.Option(ice.MSG_DAEMON) == "" { + return + } m.Optionv(ice.MSG_OPTS, m.Optionv(ice.MSG_OPTION)) if m.Option(ice.MSG_USERPOD) == "" { m.Cmd(SPACE, m.Option(ice.MSG_DAEMON), arg) diff --git a/meta.go b/meta.go index 64d7aef7..152c3c00 100644 --- a/meta.go +++ b/meta.go @@ -500,7 +500,7 @@ func (m *Message) Appendv(key string, arg ...Any) []string { if m.FieldsIsDetail() && key != KEY { for i, k := range m.meta[KEY] { - if k == key { + if k == key || k == kit.Keys(EXTRA, key) { if len(arg) > 0 { m.meta[VALUE][i] = kit.Format(arg[0]) }