mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
fix: 标记已读失败
This commit is contained in:
parent
4b5aa7fa2a
commit
d89377a8fe
@ -1032,8 +1032,12 @@ class DialogController extends AbstractController
|
|||||||
if (!$dialogUser) {
|
if (!$dialogUser) {
|
||||||
return Base::retError("会话不存在");
|
return Base::retError("会话不存在");
|
||||||
}
|
}
|
||||||
|
$data = [
|
||||||
|
'id' => $dialogId,
|
||||||
|
];
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'read':
|
case 'read':
|
||||||
|
$data['unread'] = 0;
|
||||||
WebSocketDialogMsgRead::whereUserid($user->userid)
|
WebSocketDialogMsgRead::whereUserid($user->userid)
|
||||||
->whereReadAt(null)
|
->whereReadAt(null)
|
||||||
->whereDialogId($dialogId)
|
->whereDialogId($dialogId)
|
||||||
@ -1052,10 +1056,8 @@ class DialogController extends AbstractController
|
|||||||
default:
|
default:
|
||||||
return Base::retError("参数错误");
|
return Base::retError("参数错误");
|
||||||
}
|
}
|
||||||
return Base::retSuccess("success", [
|
$data['mark_unread'] = $dialogUser->mark_unread;
|
||||||
'id' => $dialogId,
|
return Base::retSuccess("success", $data);
|
||||||
'mark_unread' => $dialogUser->mark_unread,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user