feat(client): isGroup getter for Chat
This commit is contained in:
parent
2220371efd
commit
abbebeddf9
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue