Fix shared media loading.

This commit is contained in:
John Preston 2021-12-02 13:54:30 +04:00
parent caaeff32c5
commit 0fa458737a
1 changed files with 5 additions and 1 deletions

View File

@ -85,6 +85,10 @@ std::optional<MTPmessages_Search> PrepareSearchRequest(
}(); }();
const auto hash = uint64(0); const auto hash = uint64(0);
const auto mtpOffsetId = int(std::clamp(
offsetId.bare,
int64(0),
int64(0x3FFFFFFF)));
return MTPmessages_Search( return MTPmessages_Search(
MTP_flags(0), MTP_flags(0),
peer->input, peer->input,
@ -94,7 +98,7 @@ std::optional<MTPmessages_Search> PrepareSearchRequest(
filter, filter,
MTP_int(0), // min_date MTP_int(0), // min_date
MTP_int(0), // max_date MTP_int(0), // max_date
MTP_int(offsetId), MTP_int(mtpOffsetId),
MTP_int(addOffset), MTP_int(addOffset),
MTP_int(limit), MTP_int(limit),
MTP_int(maxId), MTP_int(maxId),