群信息
This commit is contained in:
@@ -14,16 +14,21 @@ class ChatGroupMute extends BaseModel
|
||||
{
|
||||
$data['ex_mute_time'] = '';
|
||||
$data['is_mute'] = 0;
|
||||
$chat_group_mute = Db::name('chat_group_mute')->where(['group_id' => $group_id, 'user_id' => $uid])->find();
|
||||
// $chat_group_mute = Db::name('chat_group_mute')->where(['group_id' => $group_id, 'user_id' => $uid])->find();
|
||||
// 全员禁言
|
||||
$chat_group_mute = Db::name('chat_group_mute')->where(['group_id' => $group_id, 'user_id' => 0])->find();
|
||||
if($chat_group_mute) {
|
||||
if(d() <= $chat_group_mute['expire_time']) {
|
||||
$data['is_mute'] = 1; // 限期禁言
|
||||
$data['ex_mute_time'] = $chat_group_mute['expire_time'];
|
||||
}
|
||||
if($chat_group_mute['mute_time'] == 0) {
|
||||
$data['is_mute'] = 2; // 永久禁言
|
||||
}
|
||||
$data['is_mute'] = 2;
|
||||
}
|
||||
// if($chat_group_mute) {
|
||||
// if(d() <= $chat_group_mute['expire_time']) {
|
||||
// $data['is_mute'] = 1; // 限期禁言
|
||||
// $data['ex_mute_time'] = $chat_group_mute['expire_time'];
|
||||
// }
|
||||
// if($chat_group_mute['mute_time'] == 0) {
|
||||
// $data['is_mute'] = 2; // 永久禁言
|
||||
// }
|
||||
// }
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user