From b6aeff89c4e6b2c385fafbf103c4116755c1ec73 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 14 Oct 2015 00:10:33 +0200 Subject: [PATCH] Call Notice::saveActivity instead of Ostatus_profile->processActivity --- plugins/Share/SharePlugin.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/Share/SharePlugin.php b/plugins/Share/SharePlugin.php index 541d05cd6c..d62ec82592 100644 --- a/plugins/Share/SharePlugin.php +++ b/plugins/Share/SharePlugin.php @@ -116,13 +116,7 @@ class SharePlugin extends ActivityVerbHandlerPlugin // TODO: Remember to check Deleted_notice! // TODO: If a post is shared that we can't retrieve - what to do? $other = Ostatus_profile::ensureActivityObjectProfile($shared->actor); - $sharedNotice = $other->processActivity($shared, 'push'); // FIXME: push/salmon/what? - if (!$sharedNotice instanceof Notice) { - // And if we apparently can't get the shared notice, we'll abort the whole thing. - // TRANS: Client exception thrown when saving an activity share fails. - // TRANS: %s is a share ID. - throw new ClientException(sprintf(_m('Failed to save activity %s.'), $sharedUri)); - } + $sharedNotice = Notice::saveActivity($shared, $other->localProfile(), array('source'=>'share')); } catch (FeedSubException $e) { // Remote feed could not be found or verified, should we // transform this into an "RT @user Blah, blah, blah..."? -- 2.39.5