diff --git a/src/controllers/FriendsController.ts b/src/controllers/FriendsController.ts index e8c6b3f..1796274 100644 --- a/src/controllers/FriendsController.ts +++ b/src/controllers/FriendsController.ts @@ -5,6 +5,8 @@ import { UserHelper } from "../helpers/UserHelper"; import { NotifEventType } from "../entities/Notification"; import { NotificationsHelper } from "../helpers/NotificationsHelper"; import { AccountHelper } from "../helpers/AccountHelper"; +import { UserWebSocketController } from "./UserWebSocketController"; +import { time } from "../utils/DateUtils"; /** * Friends controller @@ -217,7 +219,8 @@ export class FriendsController { let info: any = { ID_friend: friend.friendID, accepted: friend.accepted, - time_last_activity: friend.lastActivityTime + time_last_activity: + UserWebSocketController.IsConnected(friend.friendID) ? time() : friend.lastActivityTime } if(full) {