From 597e64c19f6591cb562dbf6cb86e1a1c19e23da9 Mon Sep 17 00:00:00 2001 From: HDVinnie Date: Tue, 2 Apr 2019 21:23:23 -0400 Subject: [PATCH] (Fix) Anonymous Article Comments :bug: - closes #656 --- app/Http/Controllers/CommentController.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index c875ce59e..d90eaea7c 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -100,9 +100,16 @@ class CommentController extends Controller $article_url = hrefArticle($article); $profile_url = hrefProfile($user); - $this->chat->systemMessage( - "[url={$profile_url}]{$user->username}[/url] has left a comment on article [url={$article_url}]{$article->title}[/url]" - ); + // Auto Shout + if ($comment->anon == 0) { + $this->chat->systemMessage( + "[url={$profile_url}]{$user->username}[/url] has left a comment on article [url={$article_url}]{$article->title}[/url]" + ); + } else { + $this->chat->systemMessage( + "An anonymous user has left a comment on article [url={$article_url}]{$article->title}[/url]" + ); + } if ($this->tag->hasTags($request->input('content'))) { if ($this->tag->contains($request->input('content'), '@here') && $user->group->is_modo) {