]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/conversationnoticestream.php
merge 0.9.x into 1.0.x
[quix0rs-gnu-social.git] / lib / conversationnoticestream.php
index addf8768ceb57e0db3b84be1ca96d7947480c784..66075db84f436a62c095174f0036b8231fddf4a5 100644 (file)
@@ -44,13 +44,17 @@ if (!defined('STATUSNET')) {
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  * @link      http://status.net/
  */
-
 class ConversationNoticeStream extends ScopingNoticeStream
 {
-    function __construct($id)
+    function __construct($id, $profile = -1)
     {
+        if (is_int($profile) && $profile == -1) {
+            $profile = Profile::current();
+        }
+
         parent::__construct(new CachingNoticeStream(new RawConversationNoticeStream($id),
-                                                    'notice:conversation_ids:'.$id));
+                                                    'notice:conversation_ids:'.$id),
+                            $profile);
     }
 }
 
@@ -64,7 +68,6 @@ class ConversationNoticeStream extends ScopingNoticeStream
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  * @link      http://status.net/
  */
-
 class RawConversationNoticeStream extends NoticeStream
 {
     protected $id;
@@ -100,9 +103,6 @@ class RawConversationNoticeStream extends NoticeStream
             }
         }
 
-        $notice->free();
-        $notice = NULL;
-
         return $ids;
     }
 }
\ No newline at end of file