fix: join room at

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-03-27 12:15:59 +08:00
parent 3febafaffd
commit 49170766ad

View File

@@ -363,7 +363,14 @@ export class ActivityService implements OnModuleInit, OnModuleDestroy {
return uniqBy(
socketMeta
.filter((x) => x?.presence)
.map((x) => x.presence)
.map((x) => {
if (!x.presence) return
return {
...x.presence,
joinedAt: x.roomJoinedAtMap?.[roomName],
}
})
.sort((a, b) => {
if (a && b) return a.updatedAt - b.updatedAt
return 1