use Friendica\Util\Network;
use Friendica\Core\Worker;
use Friendica\Model\FContact;
+use Friendica\Protocol\Relay;
class Delivery
{
$itemdata = Model\Item::select([], $condition, $params);
while ($item = Model\Item::fetch($itemdata)) {
+ if ($item['verb'] == Activity::ANNOUNCE) {
+ continue;
+ }
+
if ($item['id'] == $parent_id) {
$parent = $item;
}
private static function deliverDFRN($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup)
{
// Transmit Diaspora reshares via Diaspora if the Friendica contact support Diaspora
- if (Diaspora::isReshare($target_item['body']) && !empty(FContact::getByUrl($contact['addr'], false))) {
+ if (Diaspora::isReshare($target_item['body']) && !empty(FContact::getByURL($contact['addr'], false))) {
Logger::info('Reshare will be transmitted via Diaspora', ['url' => $contact['url'], 'guid' => ($target_item['guid'] ?? '') ?: $target_item['id']]);
self::deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup);
return;
// When it is delivered to the public endpoint, we do mark the relay contact for archival as well
if ($public_message) {
- Diaspora::markRelayForArchival($contact);
+ Relay::markForArchival($contact);
}
if (empty($contact['contact-type']) || ($contact['contact-type'] != Model\Contact::TYPE_RELAY)) {