From 0bcecc4baa8665e44a459be5620e7a1943fbbaf8 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 15 Jul 2024 10:12:02 +0000 Subject: make sure we always have an object which was not the case when repeating one of our own items --- Zotlabs/Module/Share.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Module/Share.php') diff --git a/Zotlabs/Module/Share.php b/Zotlabs/Module/Share.php index ea9313fa8..db0acb6f5 100644 --- a/Zotlabs/Module/Share.php +++ b/Zotlabs/Module/Share.php @@ -94,6 +94,12 @@ class Share extends \Zotlabs\Web\Controller { else killme(); + $object = Activity::fetch_item([ 'id' => $item['mid'] ]); + + if (!$object) { + killme(); + } + $arr['aid'] = $item['aid']; $arr['uid'] = $item['uid']; @@ -121,7 +127,7 @@ class Share extends \Zotlabs\Web\Controller { $arr['owner_xchan'] = $item['author_xchan']; $arr['source_xchan'] = ''; - $arr['obj'] = $item['obj']; + $arr['obj'] = $object; $arr['obj_type'] = $item['obj_type']; $arr['verb'] = ACTIVITY_SHARE; -- cgit v1.2.3