mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-28 12:07:53 +02:00
56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
/*
|
|
This file is part of Telegram Desktop,
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
For license and copyright information please follow this link:
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
*/
|
|
#pragma once
|
|
|
|
class HistoryItem;
|
|
class PeerData;
|
|
class PhotoData;
|
|
|
|
namespace Ui {
|
|
class Show;
|
|
enum class ReportReason;
|
|
} // namespace Ui
|
|
|
|
namespace Data {
|
|
struct ReportInput;
|
|
} // namespace Data
|
|
|
|
namespace Api {
|
|
|
|
struct ReportResult final {
|
|
using Id = QByteArray;
|
|
struct Option final {
|
|
Id id = 0;
|
|
QString text;
|
|
};
|
|
using Options = std::vector<Option>;
|
|
Options options;
|
|
QString title;
|
|
QString error;
|
|
QString comment;
|
|
struct CommentOption {
|
|
bool optional = false;
|
|
Id id = 0;
|
|
};
|
|
std::optional<CommentOption> commentOption;
|
|
bool successful = false;
|
|
};
|
|
|
|
void SendPhotoReport(
|
|
std::shared_ptr<Ui::Show> show,
|
|
not_null<PeerData*> peer,
|
|
Ui::ReportReason reason,
|
|
const QString &comment,
|
|
not_null<PhotoData*> photo);
|
|
|
|
[[nodiscard]] auto CreateReportMessagesOrStoriesCallback(
|
|
std::shared_ptr<Ui::Show> show,
|
|
not_null<PeerData*> peer)
|
|
-> Fn<void(Data::ReportInput, Fn<void(ReportResult)>)>;
|
|
|
|
} // namespace Api
|