The language is now stored as well

This commit is contained in:
Michael 2023-09-03 04:20:09 +00:00
parent 573050c6ef
commit e68f781f9d
3 changed files with 4 additions and 1 deletions

View file

@ -60,7 +60,7 @@ class Engagement
return;
}
$parent = Post::selectFirst(['created', 'owner-id', 'uid', 'private', 'contact-contact-type'], ['uri-id' => $item['parent-uri-id']]);
$parent = Post::selectFirst(['created', 'owner-id', 'uid', 'private', 'contact-contact-type', 'language'], ['uri-id' => $item['parent-uri-id']]);
if ($parent['private'] != Item::PUBLIC) {
Logger::debug('Non public posts are not stored', ['uri-id' => $item['uri-id'], 'parent-uri-id' => $item['parent-uri-id'], 'uid' => $parent['uid'], 'private' => $parent['private']]);
return;
@ -88,6 +88,7 @@ class Engagement
'owner-id' => $parent['owner-id'],
'contact-type' => $parent['contact-contact-type'],
'media-type' => $mediatype,
'language' => $parent['language'],
'created' => $parent['created'],
'comments' => DBA::count('post', ['parent-uri-id' => $item['parent-uri-id'], 'gravity' => Item::GRAVITY_COMMENT]),
'activities' => DBA::count('post', [