summaryrefslogtreecommitdiffstats
path: root/lib/Model/ActivityPub/Internal
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-12-29 12:49:31 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-05-03 20:54:14 -0100
commit27a4785650f0d571ca97fb5ad832ee8cdb817e47 (patch)
tree43798ead6f7c3c3a7f2e32c1ce8b14c826f86712 /lib/Model/ActivityPub/Internal
parent35c4827f83a356012f800e903c86b54be43a98d5 (diff)
managing Notifications in the notification steam
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model/ActivityPub/Internal')
-rw-r--r--lib/Model/ActivityPub/Internal/SocialAppNotification.php85
1 files changed, 85 insertions, 0 deletions
diff --git a/lib/Model/ActivityPub/Internal/SocialAppNotification.php b/lib/Model/ActivityPub/Internal/SocialAppNotification.php
new file mode 100644
index 00000000..489de9f4
--- /dev/null
+++ b/lib/Model/ActivityPub/Internal/SocialAppNotification.php
@@ -0,0 +1,85 @@
+<?php
+declare(strict_types=1);
+
+
+/**
+ * Nextcloud - Social Support
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Maxence Lange <maxence@artificial-owl.com>
+ * @copyright 2018, Maxence Lange <maxence@artificial-owl.com>
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Social\Model\ActivityPub\Internal;
+
+
+use JsonSerializable;
+use OCA\Social\Model\ActivityPub\ACore;
+
+
+class SocialAppNotification extends ACore implements JsonSerializable {
+
+
+ const TYPE = 'SocialAppNotification';
+
+
+ /**
+ * Notification constructor.
+ *
+ * @param null $parent
+ */
+ public function __construct($parent = null) {
+ parent::__construct($parent);
+
+ $this->setType(self::TYPE);
+ }
+
+
+ /**
+ * @param array $data
+ */
+ public function import(array $data) {
+ parent::import($data);
+ }
+
+
+ /**
+ * @param array $data
+ */
+ public function importFromDatabase(array $data) {
+ parent::importFromDatabase($data);
+ }
+
+
+ /**
+ * @return array
+ */
+ public function jsonSerialize(): array {
+// $this->addEntryInt('publishedTime', $this->getPublishedTime());
+
+ return array_merge(
+ parent::jsonSerialize(),
+ [
+ ]
+ );
+ }
+
+}
+