2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Use 48 bit [User/Chat/Channel]Id, 56 bit PeerId.

This commit is contained in:
John Preston
2021-04-02 01:04:10 +04:00
parent 61d0cc38b0
commit 1342077dcb
83 changed files with 904 additions and 475 deletions

View File

@@ -270,7 +270,9 @@ void GroupCall::discard(const MTPDgroupCallDiscarded &data) {
Core::App().calls().applyGroupCallUpdateChecked(
&peer->session(),
MTP_updateGroupCall(
MTP_int(peer->bareId()),
MTP_int(peer->isChat()
? peerToChat(peer->id).bare
: peerToChannel(peer->id).bare),
MTP_groupCallDiscarded(
data.vid(),
data.vaccess_hash(),
@@ -740,12 +742,12 @@ void GroupCall::requestUnknownParticipants() {
for (const auto &[participantPeerId, when] : participantPeerIds) {
if (const auto userId = peerToUser(participantPeerId)) {
peerInputs.push_back(
MTP_inputPeerUser(MTP_int(userId), MTP_long(0)));
MTP_inputPeerUser(MTP_int(userId.bare), MTP_long(0))); // #TODO ids
} else if (const auto chatId = peerToChat(participantPeerId)) {
peerInputs.push_back(MTP_inputPeerChat(MTP_int(chatId)));
peerInputs.push_back(MTP_inputPeerChat(MTP_int(chatId.bare))); // #TODO ids
} else if (const auto channelId = peerToChannel(participantPeerId)) {
peerInputs.push_back(
MTP_inputPeerChannel(MTP_int(channelId), MTP_long(0)));
MTP_inputPeerChannel(MTP_int(channelId.bare), MTP_long(0))); // #TODO ids
}
}
_unknownParticipantPeersRequestId = api().request(