Exemplo n.º 1
0
        public async Task <messages_StatedMessage> SendMediaMessage(InputPeer inputPeer, InputMedia inputMedia)
        {
            var request = new Message_SendMediaRequest(inputPeer, inputMedia);
            await _sender.Send(request);

            await _sender.Recieve(request);

            return(request.StatedMessage);
        }
Exemplo n.º 2
0
        public async Task <bool> SendMediaMessage(int contactId, InputFile file)
        {
            var request = new Message_SendMediaRequest(
                new InputPeerContactConstructor(contactId),
                new InputMediaUploadedPhotoConstructor(file));

            await _sender.Send(request);

            await _sender.Recieve(request);

            return(true);
        }