]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add repeated_id to SimpleStatusArray for Qvitter's benefit
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 12 Mar 2015 23:02:48 +0000 (00:02 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 12 Mar 2015 23:02:48 +0000 (00:02 +0100)
plugins/Share/SharePlugin.php

index 69761a5f3d45df4b3e8bf0ec4e6fe752f3e2479c..70bb01adc497b82eb729c63de694087ca183afcb 100644 (file)
@@ -280,6 +280,10 @@ class SharePlugin extends ActivityVerbHandlerPlugin
     {
         if ($scoped instanceof Profile) {
             $status['repeated'] = $scoped->hasRepeated($notice);
+            // Qvitter API wants the "repeated_id" value set too.
+            $repeated = Notice::pkeyGet(array('profile_id' => $scoped->getID(),
+                                              'repeat_of' => $notice->getID()));
+            $status['repeated_id'] = $repeated->getID();
         } else {
             $status['repeated'] = false;
         }