Skip to content

Commit

Permalink
[FIX] LDAP groups to channel mapping attempts to create a new room in…
Browse files Browse the repository at this point in the history
…stead of using an existing one (#27312)
  • Loading branch information
matheusbsilva137 authored Nov 22, 2022
1 parent 1ad8097 commit 8b14fc6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion apps/meteor/app/models/server/models/Rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export class Rooms extends Base {
}

findOneByNonValidatedName(name, options) {
const room = this.findOneByName(name, options);
const room = this.findOneByNameOrFname(name, options);
if (room) {
return room;
}
Expand All @@ -332,6 +332,21 @@ export class Rooms extends Base {
return this.findOne(query, options);
}

findOneByNameOrFname(name, options) {
const query = {
$or: [
{
name,
},
{
fname: name,
},
],
};

return this.findOne(query, options);
}

findOneByNameAndNotId(name, rid) {
const query = {
_id: { $ne: rid },
Expand Down

0 comments on commit 8b14fc6

Please sign in to comment.