aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Job
diff options
context:
space:
mode:
Diffstat (limited to 'Digitigrade/Job')
-rw-r--r--Digitigrade/Job/ProcessIncomingPush.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/Digitigrade/Job/ProcessIncomingPush.php b/Digitigrade/Job/ProcessIncomingPush.php
index fefa122..4f6d955 100644
--- a/Digitigrade/Job/ProcessIncomingPush.php
+++ b/Digitigrade/Job/ProcessIncomingPush.php
@@ -18,6 +18,14 @@ class ProcessIncomingPush extends Job {
public function run() {
assert(isset($this->object->type));
$log = Logger::getInstance();
+ $type = $this->object->type;
+ if ($type == 'tombstone') {
+ if (!isset($this->object->previousType)) {
+ throw new \RuntimeException('tombstone object does not have a previousType');
+ }
+ $log->info('the following object import is actually a tombstone ...');
+ $type = $this->object->previousType;
+ }
switch ($this->object->type) {
case 'actor':
$log->info('importing actor with uri ' . $this->object->self);
@@ -32,7 +40,6 @@ class ProcessIncomingPush extends Job {
Interaction::importFromReceivedObject($this->object);
break;
case 'extension':
- case 'tombstone':
throw new \RuntimeException('object type ' . $this->object->type . ' not yet implemented :(');
default:
throw new \RuntimeException('invalid object type: ' . $this->object->type);