Fix Chat List: Copyrighted chats are not shown (#999)
This commit is contained in:
parent
2c27e16f0d
commit
580bca90e2
@ -121,9 +121,13 @@ function buildApiChatRestrictions(peerEntity: GramJs.TypeUser | GramJs.TypeChat)
|
|||||||
isRestricted: peerEntity.kicked,
|
isRestricted: peerEntity.kicked,
|
||||||
};
|
};
|
||||||
} else if (peerEntity instanceof GramJs.Channel) {
|
} else if (peerEntity instanceof GramJs.Channel) {
|
||||||
|
const isRestricted = peerEntity.restricted
|
||||||
|
&& peerEntity.restrictionReason
|
||||||
|
&& peerEntity.restrictionReason.some((reason) => reason.platform === 'all');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isNotJoined: peerEntity.left,
|
isNotJoined: peerEntity.left,
|
||||||
isRestricted: peerEntity.restricted,
|
isRestricted,
|
||||||
restrictionReason: buildApiChatRestrictionReason(peerEntity.restrictionReason),
|
restrictionReason: buildApiChatRestrictionReason(peerEntity.restrictionReason),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user