Merge pull request #188 from MoeHero/1.x.x

[fix] Forward get config error [feat] Dynamic custom uid black list
This commit is contained in:
lkeme 2022-09-21 21:15:53 +08:00 committed by GitHub
commit 32ad2c555b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -160,6 +160,7 @@ clear_group_follow = false
min_fans_num = 15000
auto_reply_text =
filter_words =
blacklist_uids =
; 游戏赛事竞猜预测|破产机|每日竞猜次数|每次竞猜硬币(1-10)|下注(1.压大,2.压小,3.随机)
[match_forecast]

View File

@ -290,7 +290,9 @@ class Dynamic
}
}
// 过滤UID
$uid_list = self::$store->get("Common.uid_list");
$default_uid_list = self::$store->get("Common.uid_list");
$custom_uid_list = empty($uids = getConf('blacklist_uids', 'dynamic')) ? [] : explode(',', $uids);
$uid_list = array_merge($default_uid_list, $custom_uid_list);
if (array_key_exists((int)$item['uid'], $uid_list)) {
Log::warning("当前动态#{$item['did']}触发UP黑名单过滤 {$item['uid']}");
return true;

View File

@ -63,7 +63,7 @@ class Forward
public static function start(): bool
{
// 取关未中奖
if (getConf('clear_group_follow', 'dynamic')) {
if (getConf('clear_dynamic', 'dynamic')) {
self::clearDynamic();
}
// 自动转发关注评论