From 1d00dc2f9b03058b2c329cbb561dddb5b62ccf0b Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:48:45 +0100 Subject: [PATCH] minor change --- src/Client.Helpers.cs | 2 +- src/Client.cs | 2 +- src/Encryption.cs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Client.Helpers.cs b/src/Client.Helpers.cs index 6b3c762..04be756 100644 --- a/src/Client.Helpers.cs +++ b/src/Client.Helpers.cs @@ -157,7 +157,6 @@ namespace WTelegram else updates = await this.Messages_SendMedia(peer, media, text, random_id, entities: entities, reply_to: reply_to_msg_id == 0 ? null : new InputReplyToMessage { reply_to_msg_id = reply_to_msg_id }, schedule_date: schedule_date == default ? null : schedule_date); - int msgId = -1; if (updates is UpdateShortSentMessage sent) return new Message { @@ -167,6 +166,7 @@ namespace WTelegram from_id = peer is InputPeerSelf ? null : new PeerUser { user_id = _session.UserId }, peer_id = InputToPeer(peer) }; + int msgId = -1; foreach (var update in updates.UpdateList) { switch (update) diff --git a/src/Client.cs b/src/Client.cs index 2f502d0..b838178 100644 --- a/src/Client.cs +++ b/src/Client.cs @@ -53,7 +53,7 @@ namespace WTelegram public bool Disconnected => _tcpClient != null && !(_tcpClient.Client?.Connected ?? false); /// ID of the current logged-in user or 0 public long UserId => _session.UserId; - /// Info about the current logged-in user. This is filled after a successful (re)login + /// Info about the current logged-in user. This is only filled after a successful (re)login, not updated later public User User { get; private set; } private Func _config; diff --git a/src/Encryption.cs b/src/Encryption.cs index 2069ef2..d88a260 100644 --- a/src/Encryption.cs +++ b/src/Encryption.cs @@ -209,8 +209,8 @@ namespace WTelegram SafePrimes.Add(p); } - private static readonly HashSet SafePrimes = [ new(new byte[] // C71CAEB9C6B1C904... - { + private static readonly HashSet SafePrimes = [ new( // C71CAEB9C6B1C904... + [ 0x5B, 0xCC, 0x2F, 0xB9, 0xE3, 0xD8, 0x9C, 0x11, 0x03, 0x04, 0xB1, 0x34, 0xF0, 0xAD, 0x4F, 0x6F, 0xBF, 0x54, 0x24, 0x4B, 0xD0, 0x15, 0x4E, 0x2E, 0xEE, 0x05, 0xB1, 0x35, 0xF6, 0x15, 0x81, 0x0D, 0x1F, 0x85, 0x29, 0xE9, 0x0C, 0x85, 0x56, 0xD9, 0x59, 0xF9, 0x7B, 0xF4, 0x49, 0x28, 0xED, 0x0D, @@ -227,7 +227,7 @@ namespace WTelegram 0xDB, 0xF4, 0x30, 0x25, 0xD2, 0x93, 0x94, 0x22, 0x58, 0x40, 0xC1, 0xA7, 0x0A, 0x8A, 0x19, 0x48, 0x0F, 0x93, 0x3D, 0x56, 0x37, 0xD0, 0x34, 0x49, 0xC1, 0x21, 0x3E, 0x8E, 0x23, 0x40, 0x0D, 0x98, 0x73, 0x3F, 0xF1, 0x70, 0x2F, 0x52, 0x6C, 0x8E, 0x04, 0xC9, 0xB1, 0xC6, 0xB9, 0xAE, 0x1C, 0xC7, 0x00 - })]; + ])]; internal static void CheckGoodGaAndGb(BigInteger g, BigInteger dh_prime) {