Browse Source

优化ai已读数据接口2

master
wanghongjun 6 months ago
parent
commit
e37a1a01cc
  1. 4
      app/enterprise/controller/Im.php

4
app/enterprise/controller/Im.php

@ -423,7 +423,7 @@ class Im extends BaseController
}
// 更新群里面我的所有未读消息为0
GroupUser::editGroupUser(['user_id' => $this->userInfo['user_id'], 'group_id' => $toContactId], ['unread' => 0]);
} else if($is_group==0) {
} else if($is_group==0 || $is_group==4) {
$chat_identify = chat_identify($this->userInfo['user_id'], $to_user);
// 更新我的未读消息为0
Message::update(['is_read' => 1], [['chat_identify', '=', $chat_identify], ['to_user', '=', $this->userInfo['user_id']]]);
@ -431,8 +431,6 @@ class Im extends BaseController
wsSendMsg($to_user, 'readAll', ['toContactId' => $this->userInfo['user_id']]);
} else if($is_group==2){
$chat_identify = $to_user;
} else if($is_group==4){
$chat_identify = chat_identify($this->userInfo['user_id'], $to_user);
}
return $chat_identify;
}

Loading…
Cancel
Save