diff --git a/packages/client/src/types/peers/chat.ts b/packages/client/src/types/peers/chat.ts index 7f68cbed..9a9d40ba 100644 --- a/packages/client/src/types/peers/chat.ts +++ b/packages/client/src/types/peers/chat.ts @@ -156,6 +156,21 @@ export class Chat { return this._type! } + /** + * Whether this chat is a group chat + * (i.e. not a channel and not PM) + */ + get isGroup(): boolean { + switch (this.type) { + case 'group': + case 'supergroup': + case 'gigagroup': + return true + } + + return false + } + /** * Whether this chat has been verified by Telegram. * Supergroups, channels and groups only