Bring back bots restricted on other platforms (#1141)
This commit is contained in:
parent
4dba7dcb61
commit
a53586f798
@ -109,9 +109,19 @@ function buildApiChatRestrictions(peerEntity: GramJs.TypeUser | GramJs.TypeChat)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (peerEntity instanceof GramJs.User) {
|
if (peerEntity instanceof GramJs.User) {
|
||||||
|
const restrictionReason = peerEntity.restricted
|
||||||
|
? buildApiChatRestrictionReason(peerEntity.restrictionReason)
|
||||||
|
: undefined;
|
||||||
|
|
||||||
|
if (restrictionReason === undefined) {
|
||||||
|
return {
|
||||||
|
isRestricted: false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isRestricted: peerEntity.restricted,
|
isRestricted: peerEntity.restricted,
|
||||||
restrictionReason: buildApiChatRestrictionReason(peerEntity.restrictionReason),
|
restrictionReason,
|
||||||
};
|
};
|
||||||
} else if (peerEntity instanceof GramJs.Chat) {
|
} else if (peerEntity instanceof GramJs.Chat) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user