diff --git a/user.go b/user.go index d54d5c9..f2aeb16 100644 --- a/user.go +++ b/user.go @@ -54,7 +54,17 @@ type User struct { // implement fmt.Stringer func (u *User) String() string { - return fmt.Sprintf("", u.NickName) + format := "User" + if u.IsFriend() { + format = "Friend" + } else if u.IsGroup() { + format = "Group" + } else if u.IsMP() { + format = "MP" + } else if u.IsSelf() { + format = "Self" + } + return fmt.Sprintf("<%s:%s>", format, u.NickName) } // GetAvatarResponse 获取用户头像