From 70695a14631389ec0807c6b71288e293aef342c7 Mon Sep 17 00:00:00 2001 From: hannes Date: Sun, 22 Nov 2015 18:59:56 +0000 Subject: [PATCH 1/3] make sure the notice is a repeat, i.e. not a delete activity notice that also can have a repeat_of set --- classes/Profile.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/Profile.php b/classes/Profile.php index 49addfe47f..55961bfc9a 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -1243,7 +1243,8 @@ class Profile extends Managed_DataObject // XXX: not really a pkey, but should work $notice = Notice::pkeyGet(array('profile_id' => $this->id, - 'repeat_of' => $notice->id)); + 'repeat_of' => $notice->id, + 'verb' => 'http://activitystrea.ms/schema/1.0/share')); return !empty($notice); } @@ -1662,4 +1663,4 @@ class Profile extends Managed_DataObject { return $this->getUser()->getConnectedApps($offset, $limit); } -} +} \ No newline at end of file From 1eba33590bfb86ecab627de7176d0096e88b28e0 Mon Sep 17 00:00:00 2001 From: hannes Date: Sun, 22 Nov 2015 20:26:08 +0000 Subject: [PATCH 2/3] ActivityVerb::SHARE instead of http://activitystrea.ms/schema/1.0/share --- classes/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Profile.php b/classes/Profile.php index 55961bfc9a..2ed48c2b45 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -1244,7 +1244,7 @@ class Profile extends Managed_DataObject $notice = Notice::pkeyGet(array('profile_id' => $this->id, 'repeat_of' => $notice->id, - 'verb' => 'http://activitystrea.ms/schema/1.0/share')); + 'verb' => ActivityVerb::SHARE)); return !empty($notice); } From 5c4a7a10525a88892c10b66308c3dcd8083aff46 Mon Sep 17 00:00:00 2001 From: hannes Date: Sun, 22 Nov 2015 20:28:07 +0000 Subject: [PATCH 3/3] make sure returned notice is a repeat, i.e. not a delete activity notice --- plugins/Share/SharePlugin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/Share/SharePlugin.php b/plugins/Share/SharePlugin.php index 1f6ddbaa3f..afee7a6ef3 100644 --- a/plugins/Share/SharePlugin.php +++ b/plugins/Share/SharePlugin.php @@ -281,7 +281,8 @@ class SharePlugin extends ActivityVerbHandlerPlugin 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())); + 'repeat_of' => $notice->getID(), + 'verb' => ActivityVerb::SHARE)); $status['repeated_id'] = $repeated->getID(); } } @@ -370,4 +371,4 @@ class SharePlugin extends ActivityVerbHandlerPlugin return true; } -} +} \ No newline at end of file