From 91e2fdc4b97544d53b2c82e8e091a5c67f599470 Mon Sep 17 00:00:00 2001 From: Red Mushie <82113471+redmushie@users.noreply.github.com> Date: Mon, 19 Aug 2024 04:56:58 +0200 Subject: [PATCH] Fix news management console publish timeout activating when nothing was published (#31161) Fix news management console updating publish timeout, now updating it *after* access checks instead of before --- Content.Server/MassMedia/Systems/NewsSystem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Server/MassMedia/Systems/NewsSystem.cs b/Content.Server/MassMedia/Systems/NewsSystem.cs index 652c3dae89..6d3a3cc505 100644 --- a/Content.Server/MassMedia/Systems/NewsSystem.cs +++ b/Content.Server/MassMedia/Systems/NewsSystem.cs @@ -132,15 +132,15 @@ public sealed class NewsSystem : SharedNewsSystem if (!ent.Comp.PublishEnabled) return; - ent.Comp.PublishEnabled = false; - ent.Comp.NextPublish = _timing.CurTime + TimeSpan.FromSeconds(ent.Comp.PublishCooldown); - if (!TryGetArticles(ent, out var articles)) return; if (!CanUse(msg.Actor, ent.Owner)) return; + ent.Comp.PublishEnabled = false; + ent.Comp.NextPublish = _timing.CurTime + TimeSpan.FromSeconds(ent.Comp.PublishCooldown); + string? authorName = null; if (_idCardSystem.TryFindIdCard(msg.Actor, out var idCard)) authorName = idCard.Comp.FullName; -- 2.51.2