verdnatura-chat/app/lib/rocketchat/methods/isGroupChat.ts

6 lines
271 B
TypeScript
Raw Normal View History

2022-02-28 18:00:47 +00:00
import { ISubscription, TSubscriptionModel } from '../../../definitions';
export default function isGroupChat(room: ISubscription | TSubscriptionModel): boolean {
return ((room.uids && room.uids.length > 2) || (room.usernames && room.usernames.length > 2)) ?? false;
}