diff --git a/framework/core/js/src/common/models/Discussion.js b/framework/core/js/src/common/models/Discussion.js index 7310c0ebf..9c12ee1ed 100644 --- a/framework/core/js/src/common/models/Discussion.js +++ b/framework/core/js/src/common/models/Discussion.js @@ -23,7 +23,7 @@ Object.assign(Discussion.prototype, { posts: Model.hasMany('posts'), mostRelevantPost: Model.hasOne('mostRelevantPost'), - readTime: Model.attribute('readTime', Model.transformDate), + lastReadAt: Model.attribute('lastReadAt', Model.transformDate), readNumber: Model.attribute('readNumber'), isUnread: computed('unreadCount', unreadCount => !!unreadCount), isRead: computed('unreadCount', unreadCount => app.session.user && !unreadCount), diff --git a/framework/core/src/Api/Serializer/DiscussionSerializer.php b/framework/core/src/Api/Serializer/DiscussionSerializer.php index e741d4682..238ba572a 100644 --- a/framework/core/src/Api/Serializer/DiscussionSerializer.php +++ b/framework/core/src/Api/Serializer/DiscussionSerializer.php @@ -57,7 +57,7 @@ class DiscussionSerializer extends BasicDiscussionSerializer if ($state = $discussion->state) { $attributes += [ - 'readTime' => $this->formatDate($state->last_read_at), + 'lastReadAt' => $this->formatDate($state->last_read_at), 'readNumber' => (int) $state->last_read_post_number ]; }