Skip to content

Commit

Permalink
chore: notify users when a room is added to a team (RocketChat#34011)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogarim authored Nov 26, 2024
1 parent 7c0cda9 commit db649ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/meteor/server/services/team/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ export class TeamService extends ServiceClassInternal implements ITeamService {
}

await Rooms.setTeamByIds(rids, teamId);
void notifyOnRoomChangedById(rids, 'updated');
return validRooms;
}

Expand Down Expand Up @@ -408,6 +409,7 @@ export class TeamService extends ServiceClassInternal implements ITeamService {
delete room.teamId;
delete room.teamDefault;
await Rooms.unsetTeamById(room._id);
void notifyOnRoomChangedById(room._id, 'updated');

if (room.t === 'c') {
await Message.saveSystemMessage('user-removed-room-from-team', team.roomId, room.name || '', user);
Expand Down

0 comments on commit db649ac

Please sign in to comment.