diff --git a/.idea/.idea.tgcli/.idea/workspace.xml b/.idea/.idea.tgcli/.idea/workspace.xml
index ec81255..5b75f7c 100644
--- a/.idea/.idea.tgcli/.idea/workspace.xml
+++ b/.idea/.idea.tgcli/.idea/workspace.xml
@@ -121,7 +121,7 @@
-
+
diff --git a/telegram/tgcli.cs b/telegram/tgcli.cs
index fe31fd4..156f585 100644
--- a/telegram/tgcli.cs
+++ b/telegram/tgcli.cs
@@ -247,21 +247,24 @@ namespace telegram
}, ctsTyping.Token);
typingTask.Start();
break;
- case Td.TdApi.Update.UpdateConnectionState state :
+ case Td.TdApi.Update.UpdateConnectionState state:
switch (state.State)
{
case Td.TdApi.ConnectionState.ConnectionStateConnecting _:
connectionState = "Connecting";
+ if (!authorized) return;
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connecting to Telegram servers...");
ScreenUpdate();
break;
case Td.TdApi.ConnectionState.ConnectionStateConnectingToProxy _:
connectionState = "Connecting";
+ if (!authorized) return;
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connecting to Proxy...");
ScreenUpdate();
break;
case Td.TdApi.ConnectionState.ConnectionStateReady _:
connectionState = "Ready";
+ if (!authorized) return;
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connected.");
Task.Run(() =>
{
@@ -272,11 +275,13 @@ namespace telegram
break;
case Td.TdApi.ConnectionState.ConnectionStateUpdating _:
connectionState = "Updating";
+ if (!authorized) return;
messageQueue.Add($"{Ansi.Yellow}[tgcli] Updating message cache...");
ScreenUpdate();
break;
case Td.TdApi.ConnectionState.ConnectionStateWaitingForNetwork _:
connectionState = "Waiting for Network";
+ if (!authorized) return;
messageQueue.Add($"{Ansi.Yellow}[tgcli] Lost connection. Waiting for network...");
ScreenUpdate();
break;