Commit 4f2095ea authored by mmn's avatar mmn

No need to do pkeyGet if not repeated (thanks hannes)

Kind of reverts commit d9ed2a0f
parent d9ed2a0f
......@@ -278,16 +278,15 @@ class SharePlugin extends ActivityVerbHandlerPlugin
*/
public function onNoticeSimpleStatusArray($notice, array &$status, Profile $scoped=null, array $args=array())
{
if ($scoped instanceof Profile) {
$status['repeated'] = $scoped->hasRepeated($notice);
$status['repeated'] = $scoped instanceof Profile
? $scoped->hasRepeated($notice)
: false;
if ($status['repeated'] === true) {
// Qvitter API wants the "repeated_id" value set too.
$repeated = Notice::pkeyGet(array('profile_id' => $scoped->getID(),
'repeat_of' => $notice->getID()));
if ($repeated instanceof Notice) {
$status['repeated_id'] = $repeated->getID();
}
} else {
$status['repeated'] = false;
$status['repeated_id'] = $repeated->getID();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment