Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Martikyan <karen.martikyan@digitain.com>2020-10-04 23:49:20 +0300
committerKaren Martikyan <karen.martikyan@digitain.com>2020-10-04 23:49:20 +0300
commitce9ad949fd056a2af9fa0f5fffda14201bdce45c (patch)
treee0406d81b7d55b4a1a584f429d32d021b29ba3d7 /Duplicati/Library
parentfa47e2bb32393bcaac303177f77ff0d732a9208e (diff)
Code quality fixes v2
Diffstat (limited to 'Duplicati/Library')
-rw-r--r--Duplicati/Library/Backend/Telegram/TelegramBackend.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Duplicati/Library/Backend/Telegram/TelegramBackend.cs b/Duplicati/Library/Backend/Telegram/TelegramBackend.cs
index 6d8d861c0..7f5efcb7e 100644
--- a/Duplicati/Library/Backend/Telegram/TelegramBackend.cs
+++ b/Duplicati/Library/Backend/Telegram/TelegramBackend.cs
@@ -394,7 +394,8 @@ namespace Duplicati.Library.Backend
if (m_phoneCodeHash == null)
{
EnsureConnected();
- m_phoneCodeHash = m_telegramClient.SendCodeRequestAsync(m_phoneNumber).GetAwaiter().GetResult();
+ var phoneCodeHash = m_telegramClient.SendCodeRequestAsync(m_phoneNumber).GetAwaiter().GetResult();
+ SetPhoneCodeHash(phoneCodeHash);
m_telegramClient.Session.Save();
if (string.IsNullOrEmpty(m_authCode))
@@ -460,6 +461,11 @@ namespace Duplicati.Library.Backend
return isAuthorized;
}
+ private static void SetPhoneCodeHash(string phoneCodeHash)
+ {
+ m_phoneCodeHash = phoneCodeHash;
+ }
+
private static void SafeExecute(Action action, string actionName)
{
lock (m_lockObj)