[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

@@ -75,6 +75,7 @@ class Activitypub_rsa extends Managed_DataObject
if ($profile->isLocal()) {
self::generate_keys($this->private_key, $this->public_key);
$this->store_keys();
$apRSA->private_key = $this->private_key;
} else {
throw new Exception('This is a remote Profile, there is no Private Key for this Profile.');
}
@@ -100,6 +101,7 @@ class Activitypub_rsa extends Managed_DataObject
if ($profile->isLocal()) {
self::generate_keys($this->private_key, $this->public_key);
$this->store_keys();
$apRSA->public_key = $this->public_key;
} else {
// This should never happen, but try to recover!
if ($fetch) {