Standards

This commit is contained in:
Michael 2020-12-11 20:20:27 +00:00
parent a43059df27
commit 61b3003f64

View file

@ -475,7 +475,8 @@ class Transmitter
* @param integer $item_id
* @return boolean "true" if the post is from ActivityPub
*/
private static function isAPPost(int $item_id) {
private static function isAPPost(int $item_id)
{
if (empty($item_id)) {
return false;
}
@ -1048,10 +1049,9 @@ class Transmitter
return false;
}
if (empty($type)) {
$condition = ['item-uri' => $item['uri'], 'protocol' => Conversation::PARCEL_ACTIVITYPUB];
$conversation = DBA::selectFirst('conversation', ['source'], $condition);
if (DBA::isResult($conversation)) {
if (!$item['origin'] && DBA::isResult($conversation)) {
$data = json_decode($conversation['source'], true);
if (!empty($data['type'])) {
if (in_array($data['type'], ['Create', 'Update'])) {
@ -1073,7 +1073,6 @@ class Transmitter
}
$type = self::getTypeOfItem($item);
}
if (!$object_mode) {
$data = ['@context' => $context ?? ActivityPub::CONTEXT];