diff --git a/ProjectLighthouse/Controllers/MessageController.cs b/ProjectLighthouse/Controllers/MessageController.cs index 193443c5..de94e0a8 100644 --- a/ProjectLighthouse/Controllers/MessageController.cs +++ b/ProjectLighthouse/Controllers/MessageController.cs @@ -28,16 +28,20 @@ namespace LBPUnion.ProjectLighthouse.Controllers ? this.StatusCode(403, "") : this.Ok ( - $"You are now logged in as user {user.Username} (id {user.UserId}).\n" + - // ReSharper disable once UnreachableCode - (EulaHelper.ShowPrivateInstanceNotice ? "\n" + EulaHelper.PrivateInstanceNotice : "") + + EulaHelper.PrivateInstanceNoticeOrBlank + "\n" + $"{EulaHelper.License}\n" ); } [HttpGet("announce")] - public IActionResult Announce() => this.Ok(""); + public async Task Announce() + { + User user = await this.database.UserFromRequest(this.Request); + if (user == null) return this.StatusCode(403, ""); + + return this.Ok($"You are now logged in as user {user.Username} (id {user.UserId}).\n\n" + EulaHelper.PrivateInstanceNoticeOrBlank); + } [HttpGet("notification")] public IActionResult Notification() => this.Ok(); diff --git a/ProjectLighthouse/Helpers/EulaHelper.cs b/ProjectLighthouse/Helpers/EulaHelper.cs index cfaa3940..8bc167e7 100644 --- a/ProjectLighthouse/Helpers/EulaHelper.cs +++ b/ProjectLighthouse/Helpers/EulaHelper.cs @@ -19,6 +19,9 @@ along with this program. If not, see ."; public const string PrivateInstanceNotice = @"This server is a private testing instance. Please do not make anything public for now, and keep in mind security isn't as tight as a full release would."; - public const bool ShowPrivateInstanceNotice = false; + // ReSharper disable once UnreachableCode + public const string PrivateInstanceNoticeOrBlank = ShowPrivateInstanceNotice ? PrivateInstanceNotice : ""; + + public const bool ShowPrivateInstanceNotice = true; } } \ No newline at end of file