]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Notice conversation is perhaps not set yet
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 31 Dec 2015 01:35:13 +0000 (02:35 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 31 Dec 2015 01:35:13 +0000 (02:35 +0100)
classes/Notice.php

index 9a8a7c56f23826f3335d6a6f89058e2bb8fdfea0..ca123407363b7ab38e324fe6cbca3c012c006acd 100644 (file)
@@ -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