mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-04-29 14:50:03 +00:00
fixed upload of files
This commit is contained in:
parent
2876916258
commit
a299c1f9e8
@ -122,8 +122,9 @@ namespace internal {
|
|||||||
|
|
||||||
// send(req, callbacks, MTP::uplDcId(index)) - for upload shifted dc id
|
// send(req, callbacks, MTP::uplDcId(index)) - for upload shifted dc id
|
||||||
// uploading always to the main dc so bareDcId == 0
|
// uploading always to the main dc so bareDcId == 0
|
||||||
inline ShiftedDcId uplDcId(DcId dcId) {
|
inline ShiftedDcId uplDcId(int index) {
|
||||||
return internal::uploadDcId(dcId, 0);
|
t_assert(index >= 0 && index < MTPUploadSessionsCount);
|
||||||
|
return internal::uploadDcId(0, index);
|
||||||
};
|
};
|
||||||
constexpr bool isUplDcId(ShiftedDcId shiftedDcId) {
|
constexpr bool isUplDcId(ShiftedDcId shiftedDcId) {
|
||||||
return (shiftedDcId >= internal::uploadDcId(0, 0)) && (shiftedDcId < internal::uploadDcId(0, MTPUploadSessionsCount - 1) + DCShift);
|
return (shiftedDcId >= internal::uploadDcId(0, 0)) && (shiftedDcId < internal::uploadDcId(0, MTPUploadSessionsCount - 1) + DCShift);
|
||||||
|
Loading…
Reference in New Issue
Block a user