The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/lib/mutationEffects/room.ts

12 lines
324 B

import { Subscriptions } from '../../stores';
export const toggleFavoriteRoom = (roomId: string, favorite: boolean, userId: string | undefined) => {
if (!userId) {
return;
}
Subscriptions.state.update(
(record) => record.rid === roomId && record.u._id === userId,
(record) => ({ ...record, f: favorite }),
);
};