]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / classes / Profile.php
index 3c3b3475b955988386b566bef7853ed33371ba9a..db8326f0f6959dbd090e39dda6ef7bfe1f77e60e 100644 (file)
@@ -160,7 +160,7 @@ class Profile extends Managed_DataObject
             return $this->getGroup()->setOriginal($filename);
         }
 
-        $imagefile = new ImageFile($this->id, Avatar::path($filename));
+        $imagefile = new ImageFile(null, Avatar::path($filename));
 
         $avatar = new Avatar();
         $avatar->profile_id = $this->id;
@@ -1572,6 +1572,15 @@ class Profile extends Managed_DataObject
         return $this->getUser()->shortenLinks($text, $always);
     }
 
+    public function isPrivateStream()
+    {
+        // We only know of public remote users as of yet...
+        if (!$this->isLocal()) {
+            return false;
+        }
+        return $this->getUser()->private_stream ? true : false;
+    }
+
     public function delPref($namespace, $topic) {
         return Profile_prefs::setData($this, $namespace, $topic, null);
     }