Browse Source

用户修改为管理或客服,黑名单清空2

master
wanghongjun 9 months ago
parent
commit
b0ec9ceb02
  1. 2
      app/enterprise/model/Friend.php
  2. 2
      app/manage/controller/Config.php

2
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]);
}
}
}

2
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);
}

Loading…
Cancel
Save