Ejemplo n.º 1
0
        public static async Task CreateChatAsync()
        {
            await ExecuteProtected(async() =>
            {
                string name = ReadChatName();

                (int p, int g)       = DIFFIE.GetPG();
                (int publ, int priv) = DIFFIE.GetKeys(p, g);

                CreateChatDto createDto = new CreateChatDto(name, LOGIN, p, g, publ);
                ChatInfoDto chat        = await CHAT_CLIENT.CreateChat(createDto);

                Console.WriteLine($"Chat {chat.Name} created, public: {publ}, private: {priv}\n");
                USER_CHAT_KEYS.Add(chat.Name, new UserChatKeys(chat, publ, priv));

                await OpenChatAsync(chat.Name);
            });
        }