Group Chat Info: Fix missing members count

This commit is contained in:
Alexander Zinchuk 2022-09-16 19:28:51 +02:00
parent edf46ec3ed
commit 3f33de2689

View File

@ -48,16 +48,18 @@ function buildApiChatFieldsFromPeerEntity(
...(accessHash && { accessHash }),
hasVideoAvatar,
...(avatarHash && { avatarHash }),
...(('username' in peerEntity) && { username: peerEntity.username }),
...(('verified' in peerEntity) && { isVerified: peerEntity.verified }),
...(('callActive' in peerEntity) && { isCallActive: peerEntity.callActive }),
...(('callNotEmpty' in peerEntity) && { isCallNotEmpty: peerEntity.callNotEmpty }),
...('username' in peerEntity && { username: peerEntity.username }),
...('verified' in peerEntity && { isVerified: peerEntity.verified }),
...('callActive' in peerEntity && { isCallActive: peerEntity.callActive }),
...('callNotEmpty' in peerEntity && { isCallNotEmpty: peerEntity.callNotEmpty }),
...('date' in peerEntity && { joinDate: peerEntity.date }),
...('participantsCount' in peerEntity && { membersCount: peerEntity.participantsCount }),
...(('noforwards' in peerEntity) && { isProtected: Boolean(peerEntity.noforwards) }),
...('participantsCount' in peerEntity && peerEntity.participantsCount !== undefined && {
membersCount: peerEntity.participantsCount,
}),
...('noforwards' in peerEntity && { isProtected: Boolean(peerEntity.noforwards) }),
...(isSupport && { isSupport: true }),
...buildApiChatPermissions(peerEntity),
...(('creator' in peerEntity) && { isCreator: peerEntity.creator }),
...('creator' in peerEntity && { isCreator: peerEntity.creator }),
...buildApiChatRestrictions(peerEntity),
...buildApiChatMigrationInfo(peerEntity),
fakeType: isScam ? 'scam' : (isFake ? 'fake' : undefined),