From 8b0fdfb4a069f381105eff21df48db7b0788f644 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 31 Dec 2015 02:35:13 +0100 Subject: [PATCH] Notice conversation is perhaps not set yet --- classes/Notice.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index 9a8a7c56f2..ca12340736 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -682,9 +682,6 @@ class Notice extends Managed_DataObject } } - // Clear the cache for subscribed users, so they'll update at next request - // XXX: someone clever could prepend instead of clearing the cache - // Only save 'attention' and metadata stuff (URLs, tags...) stuff if // the activityverb is a POST (since stuff like repeat, favorite etc. // reasonably handle notifications themselves. @@ -1044,8 +1041,10 @@ class Notice extends Managed_DataObject $this->blowStream('networkpublic'); } - self::blow('notice:list-ids:conversation:%s', $this->conversation); - self::blow('conversation:notice_count:%d', $this->conversation); + if ($this->conversation) { + self::blow('notice:list-ids:conversation:%s', $this->conversation); + self::blow('conversation:notice_count:%d', $this->conversation); + } if ($this->isRepeat()) { // XXX: we should probably only use one of these