aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2024-10-10 14:17:13 +0200
committerMario Vavti <mario@mariovavti.com>2024-10-10 14:17:13 +0200
commit96d53701222f30bc4580659e4d36f1c04d07035a (patch)
treec16c079811f5f912345d78cdeb8f0ec97f3a162a
parent2bcb6a4fede0fe525d1461d46968362cccedcaff (diff)
downloadvolse-hubzilla-96d53701222f30bc4580659e4d36f1c04d07035a.tar.gz
volse-hubzilla-96d53701222f30bc4580659e4d36f1c04d07035a.tar.bz2
volse-hubzilla-96d53701222f30bc4580659e4d36f1c04d07035a.zip
update item entity for hubzilla
-rw-r--r--Zotlabs/Entity/Item.php48
-rw-r--r--Zotlabs/Lib/Activity.php5
2 files changed, 6 insertions, 47 deletions
diff --git a/Zotlabs/Entity/Item.php b/Zotlabs/Entity/Item.php
index b5e7dcfb6..9e4bb5ee8 100644
--- a/Zotlabs/Entity/Item.php
+++ b/Zotlabs/Entity/Item.php
@@ -16,7 +16,7 @@ class Item extends BaseObject
// channel id of the owner of this record
public $uid;
- // UUID-V4
+ // UUID-V4 // If no UUID is provided UUID-V5 of the message id
public $uuid;
// message id
@@ -57,12 +57,8 @@ class Item extends BaseObject
public $author_xchan;
// portable id of real (upstream) author if relayed
public $source_xchan;
- // ActivityPub FEP
- public $approved;
// MIME type of item body
public $mimetype;
- // replyTo where to direct replies
- public $replyto;
// ISO language string
public $lang;
@@ -106,13 +102,9 @@ class Item extends BaseObject
// free-form text location
public $location;
- // float latitude;
- public float $lat;
- // float longitude;
- public float $lon;
- // deprecated combined coordinates (text)
+ // combined coordinates (text)
public $coord;
- // deprecated
+ // string public policy
public $public_policy;
// string comment policy
public $comment_policy;
@@ -1537,40 +1529,6 @@ class Item extends BaseObject
return $this;
}
- /**
- * @return float|null
- */
- public function getLat()
- {
- return $this->lat;
- }
-
- /**
- * @param float $lat
- * @return Item
- */
- public function setLat($lat)
- {
- $this->lat = $lat;
- return $this;
- }
- /**
- * @return float|null
- */
- public function getLon()
- {
- return $this->lon;
- }
-
- /**
- * @param float $lon
- * @return Item
- */
- public function setLon($lon)
- {
- $this->lon = $lon;
- return $this;
- }
}
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index f10a2bace..358bb16f0 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -3773,8 +3773,8 @@ class Activity {
->setObjType($object['type'])
->setParentMid(str_replace('/conversation/','/item/', $target))
->setThrParent(str_replace('/conversation/','/item/', $target))
- ->setApproved($object['object']['id'] ?? '')
- ->setReplyto(z_root() . '/channel/' . $channel['channel_address'])
+ // ->setApproved($object['object']['id'] ?? '')
+ // ->setReplyto(z_root() . '/channel/' . $channel['channel_address'])
->setTgtType('Collection')
->setTarget([
'id' => str_replace('/item/','/conversation/', $target),
@@ -3790,6 +3790,7 @@ class Activity {
->setPrivate($sourceItem['item_private'])
->setNocomment($sourceItem['item_nocomment'])
->setCommentPolicy($sourceItem['comment_policy'])
+ ->setPublicPolicy($sourceItem['comment_policy'])
->setPostopts($sourceItem['postopts']);
}
$result = post_activity_item($item->toArray(), deliver: $deliver, channel: $channel, observer: $channel, addAndSync: false);