aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-11-13 17:13:33 +0000
committerMario <mario@mariovavti.com>2022-11-13 17:13:33 +0000
commit6da65c7ddcc37481c039b5927edcd2bf0df33c58 (patch)
treeb1cac21745618c43498383e96f8d59bacbf3e599 /Zotlabs/Lib
parent9eb332f03265821b8f9f2965e9977aef69e0413f (diff)
downloadvolse-hubzilla-6da65c7ddcc37481c039b5927edcd2bf0df33c58.tar.gz
volse-hubzilla-6da65c7ddcc37481c039b5927edcd2bf0df33c58.tar.bz2
volse-hubzilla-6da65c7ddcc37481c039b5927edcd2bf0df33c58.zip
cast the type to update if it is an edit
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Activity.php7
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']];