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

FullMsgId rely on PeerId instead of ChannelId.

This commit is contained in:
John Preston
2021-12-09 11:32:54 +04:00
parent a8f05a01ed
commit 5e7e7eaa83
61 changed files with 446 additions and 475 deletions

View File

@@ -74,7 +74,7 @@ void SendExistingMedia(
api->sendAction(message.action);
const auto newId = FullMsgId(
peerToChannel(peer->id),
peer->id,
session->data().nextLocalMessageId());
const auto randomId = base::RandomValue<uint64>();
@@ -255,7 +255,7 @@ bool SendDice(MessageToSend &message) {
api->sendAction(message.action);
const auto newId = FullMsgId(
peerToChannel(peer->id),
peer->id,
session->data().nextLocalMessageId());
const auto randomId = base::RandomValue<uint64>();
@@ -346,10 +346,8 @@ void SendConfirmedFile(
const std::shared_ptr<FileLoadResult> &file) {
const auto isEditing = (file->type != SendMediaType::Audio)
&& (file->to.replaceMediaOf != 0);
const auto channelId = peerToChannel(file->to.peer);
const auto newId = FullMsgId(
channelId,
file->to.peer,
isEditing
? file->to.replaceMediaOf
: session->data().nextLocalMessageId());