@builder6/rooms 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -4
- package/dist/rooms/app.controller.d.ts +3 -1
- package/dist/rooms/app.controller.js +14 -7
- package/dist/rooms/app.controller.js.map +1 -1
- package/dist/rooms/emailNotification.service.js +3 -3
- package/dist/rooms/emailNotification.service.js.map +1 -1
- package/dist/rooms/rooms.controller.d.ts +0 -1
- package/dist/rooms/rooms.controller.js +1 -1
- package/dist/rooms/rooms.controller.js.map +1 -1
- package/dist/rooms/rooms.service.d.ts +8 -1
- package/dist/rooms/rooms.service.js +33 -24
- package/dist/rooms/rooms.service.js.map +1 -1
- package/package.json +7 -7
- package/src/rooms/app.controller.ts +12 -6
- package/src/rooms/emailNotification.service.tsx +3 -32
- package/src/rooms/rooms.controller.ts +1 -1
- package/src/rooms/rooms.service.ts +38 -29
- package/yarn-error.log +17218 -0
|
@@ -613,40 +613,49 @@ export class RoomsService {
|
|
|
613
613
|
return rooms;
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
async
|
|
616
|
+
async resolveRoomsInfo({ roomIds }: { roomIds: string[] }) {
|
|
617
617
|
const result = [];
|
|
618
618
|
for (const roomId of roomIds) {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
619
|
+
const room = await this.resolveRoomInfo({ roomId });
|
|
620
|
+
result.push(room);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return result;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
async resolveRoomInfo({ roomId }: { roomId: string }) {
|
|
627
|
+
if (
|
|
628
|
+
roomId &&
|
|
629
|
+
roomId.split(':').length === 3 &&
|
|
630
|
+
roomId.split(':')[0] === 'objects'
|
|
631
|
+
) {
|
|
632
|
+
const [, objectName, recordId] = roomId.split(':');
|
|
633
|
+
const record = await this.mongodbService.findOne(
|
|
634
|
+
objectName,
|
|
635
|
+
{
|
|
636
|
+
_id: recordId,
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
projection: {
|
|
640
|
+
name: 1,
|
|
634
641
|
},
|
|
635
|
-
|
|
642
|
+
},
|
|
643
|
+
);
|
|
636
644
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
645
|
+
return {
|
|
646
|
+
id: roomId,
|
|
647
|
+
name: record ? record.name : roomId,
|
|
648
|
+
url: record
|
|
649
|
+
? `${process.env.B6_ROOT_URL}/app/-/${objectName}/view/${recordId}`
|
|
650
|
+
: null,
|
|
651
|
+
};
|
|
652
|
+
} else {
|
|
653
|
+
return {
|
|
654
|
+
id: roomId,
|
|
655
|
+
name: roomId,
|
|
656
|
+
url: `${process.env.B6_HOST}/b6/rooms/${roomId}`,
|
|
657
|
+
};
|
|
648
658
|
}
|
|
649
|
-
return result;
|
|
650
659
|
}
|
|
651
660
|
|
|
652
661
|
async getInboxNotification({ inboxNotificationId, userId }) {
|