加群处理
This commit is contained in:
@@ -123,6 +123,7 @@ namespace extend\chat\model;
|
||||
// 绑定自己的UID
|
||||
Gateway::bindUid($client_id, self::getUid(self::$user_info['uid'], self::$user_info['user_type']));
|
||||
Log::info('已经绑定--》' . self::getUid(self::$user_info['uid'], self::$user_info['user_type']) . '《---》' . $client_id);
|
||||
Log::info('群成员已经绑定--》' . self::getUid(self::$user_info['uid'], self::$user_info['user_type']) . '《---》' . $client_id);
|
||||
// 先拿到会话列表
|
||||
$list_json = Redis::get('usermsg:list:' . self::$user_info['user_type'] . ':' . self::$user_info['uid']);
|
||||
if($list_json) {
|
||||
@@ -281,10 +282,12 @@ namespace extend\chat\model;
|
||||
if($grep['user_id'] != self::$user_info['uid']) {
|
||||
$user_type = $grep['role']==1?2:1;
|
||||
$str_uid = self::getUid($grep['user_id'], $user_type);
|
||||
|
||||
Log::info('群成员准备接收---' . $str_uid);
|
||||
// 群成员是否在线,在线发 不在线存起来等上线了发 免打扰也不发消息
|
||||
if($grep['is_dist'] == 0) {
|
||||
|
||||
if(Gateway::isUidOnline($str_uid)) {
|
||||
Log::info('群成员在线---' . $str_uid );
|
||||
Log::info('要发消息了---》' . $str_uid);
|
||||
Gateway::sendToUid($str_uid, self::sendReceive($notice_data));
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user