示例#1
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;
        }
示例#2
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;
        }