From 917be730bd281a7a5e256589d09c0728ad425ac1 Mon Sep 17 00:00:00 2001 From: eatmoreapple <15055461510@163.com> Date: Sun, 1 Aug 2021 08:15:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E8=81=94=E7=B3=BB=E4=BA=BA=E6=98=AF=E5=90=A6=E4=B8=BA?= =?UTF-8?q?=E7=BD=AE=E9=A1=B6=E7=8A=B6=E6=80=81=20:sparkles:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- user.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user.go b/user.go index 4a07011..e44455c 100644 --- a/user.go +++ b/user.go @@ -122,6 +122,11 @@ func (u *User) UnPin() error { return u.Self.Bot.Caller.WebWxRelationPin(req, u, 0) } +// IsPin 判断当前联系人(好友、群组、公众号)是否为置顶状态 +func (u *User) IsPin() bool { + return u.ContactFlag == 2051 +} + // Self 自己,当前登录用户对象 type Self struct { *User