Skip to content

Commit ceb2780

Browse files
committed
Fix call forwarder being including in the new DM
1 parent f9cd012 commit ceb2780

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/meteor/server/services/media-call/service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ export class MediaCallService extends ServiceClassInternal implements IMediaCall
217217
throw new Error('Invalid usernames for DM.');
218218
}
219219

220-
const newRoom = await createDirectMessage(usernames, dmCreatorId);
220+
const dmCreatorIsPartOfTheCall = call.uids.includes(dmCreatorId);
221+
222+
const newRoom = await createDirectMessage(usernames, dmCreatorId, !dmCreatorIsPartOfTheCall); // If the dm creator is not part of the call, we need to exclude him from the new DM
221223
return newRoom.rid;
222224
}
223225

0 commit comments

Comments
 (0)