minor change

This commit is contained in:
Wizou 2024-03-19 11:48:45 +01:00
parent 659906ce01
commit 1d00dc2f9b
3 changed files with 5 additions and 5 deletions

View file

@ -157,7 +157,6 @@ namespace WTelegram
else else
updates = await this.Messages_SendMedia(peer, media, text, random_id, entities: entities, 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); 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) if (updates is UpdateShortSentMessage sent)
return new Message return new Message
{ {
@ -167,6 +166,7 @@ namespace WTelegram
from_id = peer is InputPeerSelf ? null : new PeerUser { user_id = _session.UserId }, from_id = peer is InputPeerSelf ? null : new PeerUser { user_id = _session.UserId },
peer_id = InputToPeer(peer) peer_id = InputToPeer(peer)
}; };
int msgId = -1;
foreach (var update in updates.UpdateList) foreach (var update in updates.UpdateList)
{ {
switch (update) switch (update)

View file

@ -53,7 +53,7 @@ namespace WTelegram
public bool Disconnected => _tcpClient != null && !(_tcpClient.Client?.Connected ?? false); public bool Disconnected => _tcpClient != null && !(_tcpClient.Client?.Connected ?? false);
/// <summary>ID of the current logged-in user or 0</summary> /// <summary>ID of the current logged-in user or 0</summary>
public long UserId => _session.UserId; public long UserId => _session.UserId;
/// <summary>Info about the current logged-in user. This is filled after a successful (re)login</summary> /// <summary>Info about the current logged-in user. This is only filled after a successful (re)login, not updated later</summary>
public User User { get; private set; } public User User { get; private set; }
private Func<string, string> _config; private Func<string, string> _config;

View file

@ -209,8 +209,8 @@ namespace WTelegram
SafePrimes.Add(p); SafePrimes.Add(p);
} }
private static readonly HashSet<BigInteger> SafePrimes = [ new(new byte[] // C71CAEB9C6B1C904... private static readonly HashSet<BigInteger> SafePrimes = [ new( // C71CAEB9C6B1C904...
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1, 0x70, 0x2F, 0x52, 0x6C, 0x8E, 0x04, 0xC9, 0xB1, 0xC6, 0xB9, 0xAE, 0x1C, 0xC7, 0x00
})]; ])];
internal static void CheckGoodGaAndGb(BigInteger g, BigInteger dh_prime) internal static void CheckGoodGaAndGb(BigInteger g, BigInteger dh_prime)
{ {