diff --git a/app/enterprise/model/Friend.php b/app/enterprise/model/Friend.php index 750e6bc..831890a 100644 --- a/app/enterprise/model/Friend.php +++ b/app/enterprise/model/Friend.php @@ -59,7 +59,7 @@ class Friend extends BaseModel ]; $friend_ids = self::where($where)->column('friend_id'); if ($friend_ids) { - self::where('id', 'in', $friend_ids)->update(['is_blacklist' => 0]); + self::where('friend_id', 'in', $friend_ids)->update(['is_blacklist' => 0]); } } } \ No newline at end of file diff --git a/app/manage/controller/Config.php b/app/manage/controller/Config.php index e9c262a..e8c760d 100644 --- a/app/manage/controller/Config.php +++ b/app/manage/controller/Config.php @@ -76,7 +76,7 @@ class Config extends BaseController if ($name == 'chatInfo') { $status = $value['autoAddUser']['status'] ?? 0; $user_ids = $value['autoAddUser']['user_ids'] ?? []; - if ($status == 0 && $user_ids) { + if ($status == 1 && $user_ids) { foreach ($user_ids as $uid) { Friend::syncCancelBlacklist($uid); }