Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Remove duplicated property _USERNAMES from createDirectRoom.ts #26087

Merged
merged 1 commit into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/meteor/app/lib/server/functions/createDirectRoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const createDirectRoom = function (members: IUser[], roomExtraData = {},
};

if (isNewRoom) {
const tmpRoom = {
const tmpRoom: { _USERNAMES?: (string | undefined)[] } & typeof roomInfo = {
...roomInfo,
_USERNAMES: usernames,
};
Expand All @@ -88,6 +88,8 @@ export const createDirectRoom = function (members: IUser[], roomExtraData = {},
if (typeof result === 'object') {
Object.assign(roomInfo, result);
}

delete tmpRoom._USERNAMES;
}

const rid = room?._id || Rooms.insert(roomInfo);
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9297,7 +9297,7 @@ __metadata:
human-interval: ~1.0.0
moment-timezone: ~0.5.27
mongodb: ~3.5.0
checksum: f5f68008298f9482631f1f494e392cd6b8ba7971a3b0ece81ae2abe60f53d67973ff4476156fa5c9c41b8b58c4ccd284e95c545e0523996dfd05f9a80b843e07
checksum: cc8c1bbba7545628d9d039c58e701ff65cf07f241f035b731716eec0d5ef906ce09d60c3b321bbfb9e6c641994d1afd23aaeb92d645b33bf7be9942f13574173
languageName: node
linkType: hard

Expand Down