fix(client): removed "broadcast groups"
that was my misunderstanding of docs 🤷
This commit is contained in:
parent
02975b3793
commit
f81329eecf
2 changed files with 2 additions and 8 deletions
|
@ -11,9 +11,8 @@ export namespace ChatPreview {
|
||||||
* - `group`: Legacy group
|
* - `group`: Legacy group
|
||||||
* - `supergroup`: Supergroup
|
* - `supergroup`: Supergroup
|
||||||
* - `channel`: Broadcast channel
|
* - `channel`: Broadcast channel
|
||||||
* - `broadcast`: Broadcast group
|
|
||||||
*/
|
*/
|
||||||
export type Type = 'group' | 'supergroup' | 'channel' | 'broadcast'
|
export type Type = 'group' | 'supergroup' | 'channel'
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ChatPreview {
|
export class ChatPreview {
|
||||||
|
@ -45,7 +44,6 @@ export class ChatPreview {
|
||||||
get type(): ChatPreview.Type {
|
get type(): ChatPreview.Type {
|
||||||
if (!this.invite.channel) return 'group'
|
if (!this.invite.channel) return 'group'
|
||||||
if (this.invite.broadcast) return 'channel'
|
if (this.invite.broadcast) return 'channel'
|
||||||
if (this.invite.megagroup) return 'broadcast'
|
|
||||||
return 'supergroup'
|
return 'supergroup'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ export namespace Chat {
|
||||||
* - `group`: Legacy group
|
* - `group`: Legacy group
|
||||||
* - `supergroup`: Supergroup
|
* - `supergroup`: Supergroup
|
||||||
* - `channel`: Broadcast channel
|
* - `channel`: Broadcast channel
|
||||||
* - `broadcast`: Broadcast group
|
|
||||||
*/
|
*/
|
||||||
export type Type =
|
export type Type =
|
||||||
| 'private'
|
| 'private'
|
||||||
|
@ -23,7 +22,6 @@ export namespace Chat {
|
||||||
| 'group'
|
| 'group'
|
||||||
| 'supergroup'
|
| 'supergroup'
|
||||||
| 'channel'
|
| 'channel'
|
||||||
| 'broadcast'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,9 +115,7 @@ export class Chat {
|
||||||
} else if (this.peer._ === 'chat') {
|
} else if (this.peer._ === 'chat') {
|
||||||
this._type = 'group'
|
this._type = 'group'
|
||||||
} else if (this.peer._ === 'channel') {
|
} else if (this.peer._ === 'channel') {
|
||||||
this._type = this.peer.megagroup
|
this._type = this.peer.broadcast
|
||||||
? 'broadcast'
|
|
||||||
: this.peer.broadcast
|
|
||||||
? 'channel'
|
? 'channel'
|
||||||
: 'supergroup'
|
: 'supergroup'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue