+ // We received the post via AP, so we set the protocol of the server to AP
+ $contact = Contact::getById($item['author-id'], ['gsid']);
+ if (!empty($contact['gsid'])) {
+ GServer::setProtocol($contact['gsid'], Post\DeliveryData::ACTIVITYPUB);
+ }
+
+ if ($item['author-id'] != $item['owner-id']) {
+ $contact = Contact::getById($item['owner-id'], ['gsid']);
+ if (!empty($contact['gsid'])) {
+ GServer::setProtocol($contact['gsid'], Post\DeliveryData::ACTIVITYPUB);
+ }
+ }
+