mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-04 09:20:21 -05:00
add: Send notifications instead of chat announce for posts at staff area
This commit is contained in:
@@ -146,12 +146,17 @@ class PostController extends Controller
|
||||
$postUrl = sprintf('%s/forums/topics/%s?page=%s#post-%s', $appurl, $topic->id, $post->getPageNumber(), $post->id);
|
||||
$realUrl = sprintf('/forums/topics/%s?page=%s#post-%s', $topic->id, $post->getPageNumber(), $post->id);
|
||||
$profileUrl = sprintf('%s/users/%s', $appurl, $user->username);
|
||||
$this->chat->systemMessage(sprintf('[url=%s]%s[/url] has left a reply on topic [url=%s]%s[/url]', $profileUrl, $user->username, $postUrl, $topic->name));
|
||||
// Notify All Subscribers Of New Reply
|
||||
if ($topic->first_user_poster_id != $user->id) {
|
||||
$topic->notifyStarter($user, $topic, $post);
|
||||
|
||||
if (config('other.staff-forum-notify') && ($forum->id == config('other.staff-forum-id') || $forum->parent_id == config('other.staff-forum-id'))) {
|
||||
$topic->notifyStaffers($user, $topic, $post);
|
||||
} else {
|
||||
$this->chat->systemMessage(sprintf('[url=%s]%s[/url] has left a reply on topic [url=%s]%s[/url]', $profileUrl, $user->username, $postUrl, $topic->name));
|
||||
// Notify All Subscribers Of New Reply
|
||||
if ($topic->first_user_poster_id != $user->id) {
|
||||
$topic->notifyStarter($user, $topic, $post);
|
||||
}
|
||||
$topic->notifySubscribers($user, $topic, $post);
|
||||
}
|
||||
$topic->notifySubscribers($user, $topic, $post);
|
||||
//Achievements
|
||||
$user->unlock(new UserMadeFirstPost(), 1);
|
||||
$user->addProgress(new UserMade25Posts(), 1);
|
||||
|
||||
Reference in New Issue
Block a user