ZaStoGram_desktop/Telegram/SourceFiles/api/api_sending.h
John Preston 6705390a73 Remove venue selection and sending from the location box
Task: 2026/11/02/remove-venue-selection-and-sending-from-the-location-box
2026-11-03 08:10:34 +04:00

69 lines
1.6 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
#include "data/data_file_origin.h"
#include <QtCore/QString>
#include <vector>
class History;
class PhotoData;
class DocumentData;
struct FilePrepareResult;
namespace Main {
class Session;
} // namespace Main
namespace Api {
struct MessageToSend;
struct SendAction;
struct MusicSelectionItem {
not_null<DocumentData*> document;
Data::FileOrigin origin;
};
void SendExistingDocument(
MessageToSend &&message,
not_null<DocumentData*> document,
std::optional<MsgId> localMessageId = std::nullopt);
void SendMusicSelection(
MessageToSend &&message,
std::vector<MusicSelectionItem> items);
void SendExistingPhoto(
MessageToSend &&message,
not_null<PhotoData*> photo,
std::optional<MsgId> localMessageId = std::nullopt);
bool SendDice(MessageToSend &message);
// We can't create Data::LocationPoint() and use it
// for a local sending message, because we can't request
// map thumbnail in messages history without access hash.
void SendLocation(SendAction action, float64 lat, float64 lon);
void FillMessagePostFlags(
const SendAction &action,
not_null<PeerData*> peer,
MessageFlags &flags);
[[nodiscard]] MTPmessages_SendMedia::Flags PrepareSendMedia(
not_null<Main::Session*> session,
SendAction &action,
int &starsPaid);
void SendConfirmedFile(
not_null<Main::Session*> session,
const std::shared_ptr<FilePrepareResult> &file);
} // namespace Api