示例#1
0
        public async Task StartCommenication(CallbackQueryEventArgs callback)
        {
            long chatid = callback.CallbackQuery.Message.Chat.Id;

            long[] chatIds = await provider.hubService.GetChatId(chatid);

            long chatIdReceiver = chatIds[0];

            if (chatIds.Length == 0)
            {
                throw new System.Exception("Dialog is incorrect");
            }

            await provider.hubService.ConfirmDialog(chatIdReceiver, chatid, true);

            await client.SendTextMessageAsync(chatIdReceiver, "Connected", 0, false, false, 0, KeyboardHandler.EndDialog());

            await client.SendTextMessageAsync(chatid, "Connected", 0, false, false, 0, KeyboardHandler.EndDialog());
        }