From dd994263b9d4c21ece7743471733bd07794b4388 Mon Sep 17 00:00:00 2001 From: shanmite Date: Fri, 10 Dec 2021 14:50:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=AA=E8=BD=AC=E5=B7=B2=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E5=8A=9F=E8=83=BD=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/monitor.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/core/monitor.js b/lib/core/monitor.js index 94c8c7c..61551f3 100644 --- a/lib/core/monitor.js +++ b/lib/core/monitor.js @@ -316,8 +316,8 @@ class Monitor extends Searcher { const [m_uid, ori_uid] = uids, - mIsFollowed = m_uid && (new RegExp(m_uid)).test(attentionList), - oriIsFollowed = ori_uid && (new RegExp(ori_uid)).test(attentionList), + mIsFollowed = !m_uid || (new RegExp(m_uid)).test(attentionList), + oriIsFollowed = !ori_uid || (new RegExp(ori_uid)).test(attentionList), /**判断是转发源动态还是现动态 实际发奖人*/ [real_uid, realIsFollowed] = lottery_info_type === 'uid' ? [ori_uid, oriIsFollowed] @@ -346,7 +346,9 @@ class Monitor extends Searcher { } /**若勾选只转已关注 */ - if (only_followed && !mIsFollowed && !oriIsFollowed) { + if (only_followed + && (!mIsFollowed || !oriIsFollowed) + ) { log.info("筛选动态", `只转已关注(https://t.bilibili.com/${dyid})`) return false } @@ -408,7 +410,7 @@ class Monitor extends Searcher { } /* 是否是转发的动态 */ - if (isRelayDynamic && real_uid) { + if (isRelayDynamic) { /* 转发内容长度+'//'+'@'+用户名+':'+源内容 */ const addlength = RandomStr.length + 2 + uname.length + 1 + 1; onelotteryinfo.relay_chat = RandomStr + `//@${uname}:` + des;