repeated did not always find the Notice (deleted?)

This commit is contained in:
Mikael Nordfeldth 2015-03-13 00:19:08 +01:00
parent 4d6b5e70df
commit d9ed2a0fae

View File

@ -283,7 +283,9 @@ class SharePlugin extends ActivityVerbHandlerPlugin
// Qvitter API wants the "repeated_id" value set too. // Qvitter API wants the "repeated_id" value set too.
$repeated = Notice::pkeyGet(array('profile_id' => $scoped->getID(), $repeated = Notice::pkeyGet(array('profile_id' => $scoped->getID(),
'repeat_of' => $notice->getID())); 'repeat_of' => $notice->getID()));
if ($repeated instanceof Notice) {
$status['repeated_id'] = $repeated->getID(); $status['repeated_id'] = $repeated->getID();
}
} else { } else {
$status['repeated'] = false; $status['repeated'] = false;
} }