1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 15:34:26 +02:00

Rename user.lastSeenTime

This commit is contained in:
Toby Zerner
2018-08-24 21:33:48 +09:30
parent 2ee10bb49f
commit d9d8162684
5 changed files with 8 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ import icon from './icon';
* @return {Object}
*/
export default function userOnline(user) {
if (user.lastSeenTime() && user.isOnline()) {
if (user.lastSeenAt() && user.isOnline()) {
return <span className="UserOnline">{icon('fas fa-circle')}</span>;
}
}

View File

@@ -20,7 +20,7 @@ Object.assign(User.prototype, {
groups: Model.hasMany('groups'),
joinTime: Model.attribute('joinTime', Model.transformDate),
lastSeenTime: Model.attribute('lastSeenTime', Model.transformDate),
lastSeenAt: Model.attribute('lastSeenAt', Model.transformDate),
readTime: Model.attribute('readTime', Model.transformDate),
unreadNotificationsCount: Model.attribute('unreadNotificationsCount'),
newNotificationsCount: Model.attribute('newNotificationsCount'),
@@ -54,7 +54,7 @@ Object.assign(User.prototype, {
* @public
*/
isOnline() {
return this.lastSeenTime() > moment().subtract(5, 'minutes').toDate();
return this.lastSeenAt() > moment().subtract(5, 'minutes').toDate();
},
/**