public async Task ProcessTransaction(object transaction, ITelegramBotClient botClient, ILogger logger, IDbContext db)
        {
            FeedbackTransactionModel currentTransaction = transaction as FeedbackTransactionModel;


            await botClient.SendTextMessageAsync(currentTransaction.RecipientId, Messages.FeedbackInitiated);

            currentTransaction.TransactionState = new FeedbackMessageReceived();
            return;
        }
Esempio n. 2
0
        private async void FeedbackTransactionInitiated(FeedbackTransactionModel transaction)
        {
            TransactionsContainer.AddTransaction(transaction);
            _transactionProcessor.Strategy = TransactionProcessStrategy.Feedback;

            await _transactionProcessor.ProcessTransaction(
                new Message()
            {
                From = new User {
                    Id = transaction.RecipientId
                }
            },
                transaction,
                new SqlServerContext(_config["DB:MsSqlDb:ConnectionString"]));
        }