mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
add forward message method
This commit is contained in:
parent
0940d3d982
commit
acf53742f6
|
|
@ -251,6 +251,20 @@ namespace TLSharp.Core
|
|||
});
|
||||
}
|
||||
|
||||
public async Task<TLAbsUpdates> ForwardMessageAsync(TLAbsInputPeer target, int messageId)
|
||||
{
|
||||
if (!IsUserAuthorized())
|
||||
throw new InvalidOperationException("Authorize user first!");
|
||||
|
||||
return await SendRequestAsync<TLAbsUpdates>(
|
||||
new TLRequestForwardMessage()
|
||||
{
|
||||
Peer = target,
|
||||
Id = messageId,
|
||||
RandomId = Helpers.GenerateRandomLong()
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<Boolean> SendTypingAsync(TLAbsInputPeer peer)
|
||||
{
|
||||
var req = new TLRequestSetTyping()
|
||||
|
|
|
|||
Loading…
Reference in a new issue