Skip to content

Commit

Permalink
Добавлены новые устройства
Browse files Browse the repository at this point in the history
  • Loading branch information
hoplik committed Jun 30, 2024
1 parent 65e5741 commit b3fabdd
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 88 deletions.
2 changes: 1 addition & 1 deletion App.config
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<setting name="userFN" serializeAs="String">
<value />
</setting>
<setting name="userSN" serializeAs="String">
<setting name="userLN" serializeAs="String">
<value />
</setting>
<setting name="auth_code" serializeAs="String">
Expand Down
10 changes: 8 additions & 2 deletions Bot_Funcs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,14 @@ await botClient.SendTextMessageAsync(
{
Settings.Default.userID = user.Id;
if (string.IsNullOrEmpty(user.FirstName)) Settings.Default.userFN = string.Empty; else Settings.Default.userFN = user.FirstName;
if (string.IsNullOrEmpty(user.LastName)) Settings.Default.userSN = string.Empty; else Settings.Default.userSN = user.LastName;
if (string.IsNullOrEmpty(user.LastName)) Settings.Default.userLN = string.Empty; else Settings.Default.userLN = user.LastName;
if (string.IsNullOrEmpty(user.Username)) Settings.Default.userN = string.Empty; else Settings.Default.userN = user.Username;
//Сообщаем администратору о новом участнике рейтинга
await botClient.SendTextMessageAsync(
1008578121,
$"Новый участник рейтинга: {user.FirstName} {user.LastName} ({user.Username}) - {user.Id}",
replyToMessageId: message.MessageId
);
//Авторизация прошла удачно. Перегружаемся.
Application.Restart();
}
Expand Down Expand Up @@ -122,7 +128,7 @@ await botClient.SendTextMessageAsync(
{
Settings.Default.userID = user.Id;
if (string.IsNullOrEmpty(user.FirstName)) Settings.Default.userFN = string.Empty; else Settings.Default.userFN = user.FirstName;
if (string.IsNullOrEmpty(user.LastName)) Settings.Default.userSN = string.Empty; else Settings.Default.userSN = user.LastName;
if (string.IsNullOrEmpty(user.LastName)) Settings.Default.userLN = string.Empty; else Settings.Default.userLN = user.LastName;
if (string.IsNullOrEmpty(user.Username)) Settings.Default.userN = string.Empty; else Settings.Default.userN = user.Username;
//Авторизация прошла удачно. Перегружаемся.
Application.Restart();
Expand Down
2 changes: 1 addition & 1 deletion FirehoseFinder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<AutorunEnabled>true</AutorunEnabled>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>24.6.24.0</ApplicationVersion>
<ApplicationVersion>24.7.1.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
Loading

0 comments on commit b3fabdd

Please sign in to comment.