From e95e1ba3997d57dc5eb7f8bd99e1d6adb7da19c2 Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Mon, 18 Sep 2023 14:53:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20server=20=E4=BF=AE=E5=A4=8D=E6=85=A2?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=AF=BC=E8=87=B4=E5=A0=86=E6=A0=88=E6=BA=A2?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/message.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/message.go b/server/message.go index dbd701e..933e188 100644 --- a/server/message.go +++ b/server/message.go @@ -89,6 +89,10 @@ func (slf *Message) MessageType() MessageType { func (slf *Message) AttrsString() string { var attrs = make([]any, 0, len(slf.attrs)) for _, attr := range slf.attrs { + if conn, hit := attr.(*Conn); hit { + attrs = append(attrs, conn.GetID()) + continue + } if tof := reflect.TypeOf(attr); tof.Kind() == reflect.Func { attrs = append(attrs, tof.String()) continue