mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-22 13:29:22 +00:00
Use websocket to get last activity
This commit is contained in:
parent
0fbc9d9068
commit
69a3d7ed5b
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user