mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-21 21:09:22 +00:00
Fix bad users sorting
This commit is contained in:
parent
0988d2ac4a
commit
9d3275024f
@ -2,6 +2,8 @@ import { UserMembershipEntry, UserMembershipType } from "../entities/UserMembers
|
||||
import { FriendsHelper } from "./FriendsHelper";
|
||||
import { GroupsHelper } from "./GroupsHelper";
|
||||
import { ConversationsHelper } from "./ConversationsHelper";
|
||||
import { UserWebSocketController } from "../controllers/UserWebSocketController";
|
||||
import { time } from "../utils/DateUtils";
|
||||
|
||||
/**
|
||||
* Web applications helper
|
||||
@ -27,7 +29,10 @@ export class WebappHelper {
|
||||
|
||||
// Add friends to the list
|
||||
friendsList.forEach((f) => list.push(new UserMembershipEntry(
|
||||
f.lastActivityTime, f, UserMembershipType.FRIEND)));
|
||||
UserWebSocketController.IsConnected(f.friendID) ? time() : f.lastActivityTime,
|
||||
f,
|
||||
UserMembershipType.FRIEND
|
||||
)));
|
||||
|
||||
// Add groups to the list
|
||||
for(const g of groupsList) list.push(new UserMembershipEntry(
|
||||
|
Loading…
Reference in New Issue
Block a user