群信息
This commit is contained in:
@@ -22,7 +22,7 @@ class GroupController extends ApiController
|
|||||||
if (empty($shop_id)) {
|
if (empty($shop_id)) {
|
||||||
return $this->error('参数不存在');
|
return $this->error('参数不存在');
|
||||||
}
|
}
|
||||||
return $this->success(Db::name('chat_group')->where(['shop_id' => $shop_id])->find());
|
return $this->success(Db::name('chat_group')->where(['shop_id' => $shop_id, 'owner_id' => $this->uid])->find());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -157,16 +157,20 @@ namespace extend\chat\model;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询此人是否被禁言
|
|
||||||
$chat_group_mute = ChatGroupMute::getUserMuteStatus(self::$user_info['uid'], $group_id);
|
// 群主不禁言
|
||||||
if($chat_group_mute['is_mute'] == 1) {
|
if($is_member['role'] != 1) {
|
||||||
Gateway::sendToClient($client_id, json_encode(['msg' => '你已经被禁言,' . $chat_group_mute['ex_mute_time'] . '解除']));
|
// 查询此人是否被禁言
|
||||||
return;
|
$chat_group_mute = ChatGroupMute::getUserMuteStatus(self::$user_info['uid'], $group_id);
|
||||||
|
if($chat_group_mute['is_mute'] == 1) {
|
||||||
|
Gateway::sendToClient($client_id, json_encode(['msg' => '你已经被禁言,' . $chat_group_mute['ex_mute_time'] . '解除']));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if($chat_group_mute['is_mute'] == 2) {
|
||||||
|
Gateway::sendToClient($client_id, json_encode(['msg' => '禁言中']));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($chat_group_mute['is_mute'] == 2) {
|
|
||||||
Gateway::sendToClient($client_id, json_encode(['msg' => '你已被永久禁言']));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$session_id = $message['session_id'];
|
$session_id = $message['session_id'];
|
||||||
if(empty($session_id)) {
|
if(empty($session_id)) {
|
||||||
@@ -210,7 +214,7 @@ namespace extend\chat\model;
|
|||||||
'content' => $message['content'],
|
'content' => $message['content'],
|
||||||
'image_url' => $message['image_url'],
|
'image_url' => $message['image_url'],
|
||||||
'order_id' => $message['order_id'],
|
'order_id' => $message['order_id'],
|
||||||
'coupon' => $message['coupon'],
|
'coupon' => $message['coupon']?:'',
|
||||||
'send_time' => $time,
|
'send_time' => $time,
|
||||||
'session_id' => $session_id,
|
'session_id' => $session_id,
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user