fix: fix mergeSubscriptionsRooms (#3770)

This commit is contained in:
Gleidson Daniel Silva 2022-02-23 15:55:38 -03:00 committed by GitHub
parent b5d964095e
commit 531ad9b9b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ export default async (serverSubscriptions: IServerSubscription, serverRooms: ISe
const findData = await findSubscriptionsRooms(subscriptions, rooms);
// Merge each subscription into a room
const mergedSubscriptions = findData.subscriptions.map(subscription => {
const index = findData.rooms.findIndex(({ _id }) => _id === subscription.rid);
const index = rooms.findIndex(({ _id }) => _id === subscription.rid);
// Room not found
if (index < 0) {
return merge(subscription);