diff options
author | Mario <mario@mariovavti.com> | 2022-11-13 17:13:33 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-11-13 17:13:33 +0000 |
commit | 6da65c7ddcc37481c039b5927edcd2bf0df33c58 (patch) | |
tree | b1cac21745618c43498383e96f8d59bacbf3e599 | |
parent | 9eb332f03265821b8f9f2965e9977aef69e0413f (diff) | |
download | volse-hubzilla-6da65c7ddcc37481c039b5927edcd2bf0df33c58.tar.gz volse-hubzilla-6da65c7ddcc37481c039b5927edcd2bf0df33c58.tar.bz2 volse-hubzilla-6da65c7ddcc37481c039b5927edcd2bf0df33c58.zip |
cast the type to update if it is an edit
-rw-r--r-- | Zotlabs/Lib/Activity.php | 7 |
1 files changed, 6 insertions, 1 deletions
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']]; |