From e969fc5b4ccf6a1a4778eaf48e3419d8c26c5bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 22 Feb 2025 14:50:14 +0900 Subject: [PATCH] feat: add chat --- chat/item.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chat/item.go b/chat/item.go index 34e1692..7915eda 100644 --- a/chat/item.go +++ b/chat/item.go @@ -11,8 +11,10 @@ func (item *item) writeToBuilder(sb *strings.Builder, atprefix, namel, namer str if item.isatme { sb.WriteString(atprefix) } - sb.WriteString(namel) - sb.WriteString(item.usr) - sb.WriteString(namer) + if item.usr != "" { + sb.WriteString(namel) + sb.WriteString(item.usr) + sb.WriteString(namer) + } sb.WriteString(item.txt) }