AutoCleanForm FIX
- adding MessageDeleted event to AutoCleanForm for catching messages getting deleted outside of AutoCleanForm - added OnMessageDelete invoke to DeleteMessage in DeviceSession
This commit is contained in:
@@ -644,18 +644,12 @@ namespace TelegramBotBase.Sessions
|
||||
/// <returns></returns>
|
||||
public virtual async Task<bool> DeleteMessage(int messageId = -1)
|
||||
{
|
||||
try
|
||||
{
|
||||
await RAW(a => a.DeleteMessageAsync(this.DeviceId, messageId));
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (ApiRequestException)
|
||||
{
|
||||
await RAW(a => a.DeleteMessageAsync(this.DeviceId, messageId));
|
||||
|
||||
}
|
||||
OnMessageDeleted(new MessageDeletedEventArgs(messageId));
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user