summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index ac4640534..3702dbcfa 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -282,12 +282,6 @@ class Notice extends Memcached_DataObject
$notice->content = $final;
- if (!empty($rendered)) {
- $notice->rendered = $rendered;
- } else {
- $notice->rendered = common_render_content($final, $notice);
- }
-
$notice->source = $source;
$notice->uri = $uri;
$notice->url = $url;
@@ -315,6 +309,12 @@ class Notice extends Memcached_DataObject
$notice->location_ns = $location_ns;
}
+ if (!empty($rendered)) {
+ $notice->rendered = $rendered;
+ } else {
+ $notice->rendered = common_render_content($final, $notice);
+ }
+
if (Event::handle('StartNoticeSave', array(&$notice))) {
// XXX: some of these functions write to the DB
@@ -944,6 +944,8 @@ class Notice extends Memcached_DataObject
$reply->profile_id = $user->id;
$id = $reply->insert();
+
+ self::blow('reply:stream:%d', $user->id);
}
}
@@ -971,7 +973,10 @@ class Notice extends Memcached_DataObject
$sender = Profile::staticGet($this->profile_id);
- $mentions = common_find_mentions($this->profile_id, $this->content);
+ // @todo ideally this parser information would only
+ // be calculated once.
+
+ $mentions = common_find_mentions($this->content, $this);
$replied = array();