]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/newnotice.php
Merge branch 'fix-author-fallback' into 'nightly'
[quix0rs-gnu-social.git] / actions / newnotice.php
index 16ca3bb999c997fe425025c3aee380d5d77aed39..6ee209206110ccbfcca611837a08e2e2f82aee1b 100644 (file)
@@ -104,7 +104,7 @@ class NewnoticeAction extends FormAction
             // throws exception on failure
             $upload = MediaFile::fromUpload('attach', $this->scoped);
             if (Event::handle('StartSaveNewNoticeAppendAttachment', array($this, $upload, &$content, &$options))) {
-                $content = ($content==='' ? '' : ' ') . $upload->shortUrl();
+                $content .= ($content==='' ? '' : ' ') . $upload->shortUrl();
             }
             Event::handle('EndSaveNewNoticeAppendAttachment', array($this, $upload, &$content, &$options));
 
@@ -190,6 +190,9 @@ class NewnoticeAction extends FormAction
             // and maybe even directly save whether they're local or not!
             $act->context->attention = common_get_attentions($content, $this->scoped, $parent);
 
+            // $options gets filled with possible scoping settings
+            ToSelector::fillActivity($this, $act, $options);
+
             $actobj = new ActivityObject();
             $actobj->type = ActivityObject::NOTE;
             $actobj->content = common_render_content($content, $this->scoped, $parent);