From a899e2bee1b5095741e239bf91f29bc44b3c1d26 Mon Sep 17 00:00:00 2001 From: xky Date: Fri, 15 Sep 2023 14:09:51 +0800 Subject: [PATCH] feat: isMuted for check the contact nofity status --- src/interface/contact.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/interface/contact.js b/src/interface/contact.js index fa86224..e79fb0a 100644 --- a/src/interface/contact.js +++ b/src/interface/contact.js @@ -70,6 +70,11 @@ export function isPublicContact (contact) { return contact.VerifyFlag & CONF.MM_USERATTRVERIFYFALG_BIZ_BRAND } +export function isMuted(concat) { + return isRoomContact(concat) ? concat.Statues === CONF.CHATROOM_NOTIFY_CLOSE : + concat.ContactFlag & CONF.CONTACTFLAG_NOTIFYCLOSECONTACT; +} + const contactProto = { init: function (instance) { // 纠正错误以后保持兼容 @@ -126,6 +131,7 @@ export default function ContactFactory (instance) { getDisplayName, isRoomContact, isPublicContact, - isSpContact + isSpContact, + isMuted } }