make sure we provide a created timestamp for likes and remove the workaround which returned the wrong date format

This commit is contained in:
Mario Vavti
2023-02-16 13:12:22 +01:00
parent cbf8c4bdb2
commit 7839b931f1
2 changed files with 3 additions and 1 deletions

View File

@@ -822,7 +822,8 @@ class Activity {
];
}
$ret['published'] = ((isset($i['created'])) ? datetime_convert('UTC', 'UTC', $i['created'], ATOM_TIME) : datetime_convert());
$ret['published'] = datetime_convert('UTC', 'UTC', $i['created'], ATOM_TIME);
if (isset($i['created'], $i['edited']) && $i['created'] !== $i['edited']) {
$ret['updated'] = datetime_convert('UTC', 'UTC', $i['edited'], ATOM_TIME);
if ($ret['type'] === 'Create') {

View File

@@ -546,6 +546,7 @@ class Like extends Controller {
$arr['deny_cid'] = $deny_cid;
$arr['deny_gid'] = $deny_gid;
$arr['item_private'] = $private;
$arr['created'] = datetime_convert();
call_hooks('post_local', $arr);