1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 23:44:27 +02:00

Fix some incorrect attribute names

This commit is contained in:
Toby Zerner
2018-07-21 17:19:15 +09:30
parent 4f259425b0
commit 7d0813bce4
7 changed files with 10 additions and 9 deletions

View File

@@ -51,7 +51,7 @@ class DiscussionRepository
{
return Discussion::leftJoin('discussions_users', 'discussions_users.discussion_id', '=', 'discussions.id')
->where('user_id', $user->id)
->whereRaw('read_number >= last_post_number')
->whereRaw('last_read_post_number >= last_post_number')
->pluck('id')
->all();
}

View File

@@ -57,8 +57,8 @@ class UserState extends AbstractModel
*/
public function read($number)
{
if ($number > $this->last_read_at) {
$this->last_read_at = $number;
if ($number > $this->last_read_post_number) {
$this->last_read_post_number = $number;
$this->last_read_at = Carbon::now();
$this->raise(new UserRead($this));