From 9144684df98ba7b689c9a61da5a57c0898aef035 Mon Sep 17 00:00:00 2001 From: Archi Date: Fri, 30 Dec 2022 17:22:21 +0100 Subject: [PATCH] I knew I forgot about something --- .../RemoteCommunication.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs index a13f8d2c8..73f48bb04 100644 --- a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs +++ b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs @@ -147,14 +147,14 @@ internal sealed class RemoteCommunication : IAsyncDisposable, IDisposable { internal void OnNewItemsNotification() => ShouldSendAnnouncementEarlier = true; internal async Task OnPersonaState(string? nickname = null, string? avatarHash = null) { - if (WebBrowser == null) { - throw new InvalidOperationException(nameof(WebBrowser)); - } - if (!Bot.BotConfig.RemoteCommunication.HasFlag(BotConfig.ERemoteCommunication.PublicListing) || !Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.SteamTradeMatcher)) { return; } + if (WebBrowser == null) { + throw new InvalidOperationException(nameof(WebBrowser)); + } + if ((DateTime.UtcNow < LastAnnouncement.AddMinutes(ShouldSendAnnouncementEarlier ? MinAnnouncementTTL : MaxAnnouncementTTL)) && ShouldSendHeartBeats) { return; }