]> git.mxchange.org Git - friendica.git/commitdiff
We don't need to pass the protocol that way
authorMichael <heluecht@pirati.ca>
Fri, 28 Feb 2020 09:46:53 +0000 (09:46 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 28 Feb 2020 09:46:53 +0000 (09:46 +0000)
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Receiver.php

index f184bb405b74e97812760c2f84442ca861338a32..724ac3092d209c8b7ad8a6d2ddd66f25cd193fbf 100644 (file)
@@ -29,6 +29,7 @@ use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\APContact;
 use Friendica\Model\Contact;
+use Friendica\Model\Conversation;
 use Friendica\Model\Event;
 use Friendica\Model\Item;
 use Friendica\Model\Mail;
@@ -448,9 +449,9 @@ class Processor
                $item['owner-link'] = $activity['actor'];
                $item['owner-id'] = Contact::getIdForURL($activity['actor'], 0, true);
 
-               if (!empty($activity['raw']) && isset($activity['protocol'])) {
+               if (!empty($activity['raw'])) {
                        $item['source'] = $activity['raw'];
-                       $item['protocol'] = $activity['protocol'];
+                       $item['protocol'] = Conversation::PARCEL_ACTIVITYPUB;
                        $item['conversation-href'] = $activity['context'] ?? '';
                        $item['conversation-uri'] = $activity['conversation'] ?? '';
                }
index b7622e962fc57d95dfd91add10c560a6bb28ac63..a6d3d6479e3d359aaa7654a82097fa3f1c870e58 100644 (file)
@@ -28,7 +28,6 @@ use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Model\Contact;
 use Friendica\Model\APContact;
-use Friendica\Model\Conversation;
 use Friendica\Model\Item;
 use Friendica\Model\User;
 use Friendica\Protocol\Activity;
@@ -355,7 +354,6 @@ class Receiver
 
                if (!empty($body)) {
                        $object_data['raw'] = $body;
-                       $object_data['protocol'] = Conversation::PARCEL_ACTIVITYPUB;
                }
 
                // Internal flag for thread completion. See Processor.php