Beispiel #1
0
 private async Task RemovePreviousMessages(int chatId, BaseTransactionModel currentTransaction)
 {
     foreach (var id in currentTransaction.MessageIds)
     {
         await _botClient.DeleteMessageAsync(chatId, id);
     }
     currentTransaction.MessageIds.Clear();
 }
Beispiel #2
0
 private static TransactionProcessStrategy SelectStrategy(BaseTransactionModel transaction)
 {
     return((transaction.TransactionType) switch
     {
         TransactionType.DateMessaging => TransactionProcessStrategy.Date,
         TransactionType.Command => TransactionProcessStrategy.Command,
         TransactionType.Registration => TransactionProcessStrategy.Registration,
         TransactionType.Feedback => TransactionProcessStrategy.Feedback,
         TransactionType.Report => TransactionProcessStrategy.Report,
         _ => TransactionProcessStrategy.Default
     });