From 488e700fabb479e82773d9a7c0325b030e1895e1 Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Thu, 22 Jul 2021 13:02:09 +0100 Subject: [PATCH] [POSTING] Make it possible for plugins to change the placeholder string --- components/Posting/Posting.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/Posting/Posting.php b/components/Posting/Posting.php index 47aff43683..3d8489f25c 100644 --- a/components/Posting/Posting.php +++ b/components/Posting/Posting.php @@ -70,7 +70,8 @@ END; } $placeholder_string = ['How are you feeling?', 'Have something to share?', 'How was your day?']; - $rand_key = array_rand($placeholder_string); + Event::handle('PostingPlaceHolderString', [&$placeholder_string]); + $rand_key = array_rand($placeholder_string); $request = $vars['request']; $form = Form::create([ @@ -104,7 +105,7 @@ END; */ public static function storeNote(int $actor_id, ?string $content, array $attachments, bool $is_local, ?int $reply_to = null, ?int $repeat_of = null) { - $note = Note::create([ + $note = Note::create([ 'gsactor_id' => $actor_id, 'content' => $content, 'is_local' => $is_local,