summaryrefslogtreecommitdiffstats
path: root/lib/Service/CacheActorService.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/CacheActorService.php')
-rw-r--r--lib/Service/CacheActorService.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Service/CacheActorService.php b/lib/Service/CacheActorService.php
index 41ec3954..7420dda5 100644
--- a/lib/Service/CacheActorService.php
+++ b/lib/Service/CacheActorService.php
@@ -139,7 +139,7 @@ class CacheActorService {
/** @var Person $actor */
$actor = AP::$activityPub->getItemFromData($object);
- if ($actor->getType() !== Person::TYPE) {
+ if (!AP::$activityPub->isActor($actor)) {
throw new InvalidResourceException();
}
@@ -273,7 +273,7 @@ class CacheActorService {
*/
private function save(Person $actor) {
try {
- $interface = AP::$activityPub->getInterfaceFromType(Person::TYPE);
+ $interface = AP::$activityPub->getInterfaceFromType($actor->getType());
$interface->save($actor);
} catch (ItemUnknownException $e) {
}