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

Allocate 64 bits for message ids.

This commit is contained in:
John Preston
2021-09-30 10:04:55 +04:00
parent 6adf791b3b
commit 1e660fc2a2
29 changed files with 337 additions and 162 deletions

View File

@@ -274,7 +274,6 @@ AdminLog::OwnedItem GenerateCommentItem(
if (data.comment.isEmpty()) {
return nullptr;
}
const auto id = ServerMaxMsgId + (ServerMaxMsgId / 2);
const auto flags = MessageFlag::HasFromId
| MessageFlag::Outgoing
| MessageFlag::FakeHistoryItem;
@@ -282,7 +281,7 @@ AdminLog::OwnedItem GenerateCommentItem(
const auto viaBotId = UserId();
const auto groupedId = uint64();
const auto item = history->makeMessage(
id,
history->owner().nextNonHistoryEntryId(),
flags,
replyTo,
viaBotId,
@@ -305,7 +304,7 @@ AdminLog::OwnedItem GenerateContactItem(
const auto postAuthor = QString();
const auto groupedId = uint64();
const auto item = history->makeMessage(
(ServerMaxMsgId + (ServerMaxMsgId / 2) + 1),
history->owner().nextNonHistoryEntryId(),
(MessageFlag::HasFromId
| MessageFlag::Outgoing
| MessageFlag::FakeHistoryItem),