]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Call Notice::saveActivity instead of Ostatus_profile->processActivity
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 13 Oct 2015 22:10:33 +0000 (00:10 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 13 Oct 2015 22:10:54 +0000 (00:10 +0200)
plugins/Share/SharePlugin.php

index 541d05cd6cfdcd2548b7b551a67545e63e7f2cc8..d62ec8259273bf90e5df64dba6514ad99dc033cf 100644 (file)
@@ -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..."?