1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-25 23:09:22 +00:00

Use websocket to get last activity

This commit is contained in:
Pierre HUBERT 2020-03-30 15:47:54 +02:00
parent 0fbc9d9068
commit 69a3d7ed5b

View File

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