upload: import Ayu initial

Co-authored-by: SharapaGorg <sharapov.savely@yandex.ru>
This commit is contained in:
ZavaruKitsu
2023-06-03 19:00:05 +03:00
parent be89e57d27
commit eaba9781a5
86 changed files with 282538 additions and 140 deletions
@@ -15,6 +15,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_peer_values.h"
#include "apiwrap.h"
#include "ayu/ayu_settings.h"
namespace Api {
namespace {
@@ -112,6 +114,14 @@ void SendProgressManager::send(const Key &key, int progress) {
if (skipRequest(key)) {
return;
}
// AyuGram sendUploadProgress
const auto settings = &AyuSettings::getInstance();
if (!settings->sendUploadProgress) {
DEBUG_LOG(("[AyuGram] Don't send upload progress"));
return;
}
using Type = SendProgressType;
const auto action = [&]() -> MTPsendMessageAction {
const auto p = MTP_int(progress);