summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-12-17 08:06:03 -0100
committerMaxence Lange <maxence@artificial-owl.com>2018-12-17 08:06:03 -0100
commitd028ab206c87d162d76808647a7c8afc004627d4 (patch)
treecf881be7d359470be1c6bc18a4252566dde53734 /lib
parent76775ddf2882bc0d6af1b4e0adc460c826efc38f (diff)
init vars
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Model/ActivityPub/Object/Image.php2
-rw-r--r--lib/Model/ActivityPub/Object/Note.php9
-rw-r--r--lib/Model/Post.php4
3 files changed, 11 insertions, 4 deletions
diff --git a/lib/Model/ActivityPub/Object/Image.php b/lib/Model/ActivityPub/Object/Image.php
index 11a6d652..be7fd266 100644
--- a/lib/Model/ActivityPub/Object/Image.php
+++ b/lib/Model/ActivityPub/Object/Image.php
@@ -32,6 +32,7 @@ namespace OCA\Social\Model\ActivityPub\Object;
use JsonSerializable;
+use OCA\Social\Exceptions\InvalidResourceEntryException;
use OCA\Social\Exceptions\UrlCloudException;
use OCA\Social\Model\ActivityPub\ACore;
@@ -63,6 +64,7 @@ class Image extends Document implements JsonSerializable {
* @param array $data
*
* @throws UrlCloudException
+ * @throws InvalidResourceEntryException
*/
public function import(array $data) {
parent::import($data);
diff --git a/lib/Model/ActivityPub/Object/Note.php b/lib/Model/ActivityPub/Object/Note.php
index ddfac724..8b5c7e87 100644
--- a/lib/Model/ActivityPub/Object/Note.php
+++ b/lib/Model/ActivityPub/Object/Note.php
@@ -40,12 +40,17 @@ class Note extends ACore implements JsonSerializable {
const TYPE = 'Note';
+ const TYPE_PUBLIC = 'public';
+ const TYPE_UNLISTED = 'unlisted';
+ const TYPE_FOLLOWERS = 'followers';
+ const TYPE_DIRECT = 'direct';
+
/** @var string */
- private $content;
+ private $content = '';
/** @var string */
- private $attributedTo;
+ private $attributedTo = '';
/** @var string */
private $inReplyTo = '';
diff --git a/lib/Model/Post.php b/lib/Model/Post.php
index 2c2d5353..422729cd 100644
--- a/lib/Model/Post.php
+++ b/lib/Model/Post.php
@@ -55,10 +55,10 @@ class Post implements JsonSerializable {
private $replyTo = '';
/** @var string */
- private $content;
+ private $content = '';
/** @var string */
- private $type;
+ private $type = '';
/**