This commit is contained in:
kuaifan
2023-12-25 22:19:56 +08:00
committed by Pang
parent 865dc61cd1
commit 8a7e80fe86
81 changed files with 993 additions and 968 deletions

View File

@@ -47,6 +47,20 @@ class WebSocketDialogMsgRead extends AbstractModel
return $this->hasOne(WebSocketDialogMsg::class, 'id', 'msg_id');
}
/**
* 强制标记成阅读
* @param $dialogId
* @param $userId
* @return void
*/
public static function forceRead($dialogId, $userId)
{
self::whereDialogId($dialogId)
->whereUserid($userId)
->whereNull('read_at')
->update(['read_at' => Carbon::now()]);
}
/**
* 仅标记成阅读
* @param $list