[ActivityPub] Caching of Following/Followers interactions and collections

Follow interaction:
- Fixed mini-bug where the subscriber profile was being used as the subscribed
- Updated cache subscription-related values in both instances
- Tested and working with local GS instances

Unfollow interaction:
- Updated cache subscription-related values in both instances
- Tested and working with local GS instances

Followers/Following collections:
- Now returning ActivityPub profiles only
- Stored collections in cache

Misc:
- Fix bug concerning the retrieval of public/private-key after in-function generation
This commit is contained in:
brunoccast
2019-07-08 19:23:48 +01:00
committed by Diogo Cordeiro
parent 735a0023cc
commit 94a4059b4a
8 changed files with 219 additions and 18 deletions

View File

@@ -387,7 +387,7 @@ class ActivityPubPlugin extends Plugin
ActivityPubPlugin::actor_uri($object->getProfile()),
'application/activity+json'
);
$xrd->links[] = clone ($link);
$xrd->links[] = clone($link);
}
}
@@ -559,8 +559,7 @@ class ActivityPubPlugin extends Plugin
* @throws HTTP_Request2_Exception
* @author Diogo Cordeiro <diogo@fc.up.pt>
*/
public function onStartSubscribe(Profile $profile, Profile $other)
{
public function onStartSubscribe(Profile $profile, Profile $other) {
if (!$profile->isLocal() && $other->isLocal()) {
return true;
}