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

@@ -2499,7 +2499,7 @@ void History::dialogEntryApplied() {
addOlderSlice(QVector<MTPMessage>());
if (const auto channel = peer->asChannel()) {
const auto inviter = channel->inviter;
if (inviter > 0 && channel->amIn()) {
if (inviter && channel->amIn()) {
if (const auto from = owner().userLoaded(inviter)) {
insertJoinedMessage();
}
@@ -2511,7 +2511,7 @@ void History::dialogEntryApplied() {
if (chatListTimeId() != 0 && loadedAtBottom()) {
if (const auto channel = peer->asChannel()) {
const auto inviter = channel->inviter;
if (inviter > 0
if (inviter
&& chatListTimeId() <= channel->inviteDate
&& channel->amIn()) {
if (const auto from = owner().userLoaded(inviter)) {
@@ -2766,7 +2766,7 @@ HistoryService *History::insertJoinedMessage() {
return _joinedMessage;
}
const auto inviter = (peer->asChannel()->inviter > 0)
const auto inviter = peer->asChannel()->inviter
? owner().userLoaded(peer->asChannel()->inviter)
: nullptr;
if (!inviter) {
@@ -2837,7 +2837,7 @@ void History::checkLocalMessages() {
}
if (isChannel()
&& !_joinedMessage
&& (peer->asChannel()->inviter > 0)
&& peer->asChannel()->inviter
&& goodDate(peer->asChannel()->inviteDate)) {
insertJoinedMessage();
}