From 6da65c7ddcc37481c039b5927edcd2bf0df33c58 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 13 Nov 2022 17:13:33 +0000 Subject: cast the type to update if it is an edit --- Zotlabs/Lib/Activity.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 963a8ff75..9dbb15c28 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -545,6 +545,7 @@ class Activity { call_hooks('encode_item', $hookinfo); + return $hookinfo['encoded']; } @@ -821,8 +822,12 @@ class Activity { } $ret['published'] = ((isset($i['created'])) ? datetime_convert('UTC', 'UTC', $i['created'], ATOM_TIME) : datetime_convert()); - if (isset($i['created'], $i['edited']) && $i['created'] !== $i['edited']) + if (isset($i['created'], $i['edited']) && $i['created'] !== $i['edited']) { $ret['updated'] = datetime_convert('UTC', 'UTC', $i['edited'], ATOM_TIME); + if ($ret['type'] === 'Create') { + $ret['type'] = 'Update'; + } + } if (isset($i['app']) && $i['app']) { $ret['generator'] = ['type' => 'Application', 'name' => $i['app']]; -- cgit v1.2.3