]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Favorite/FavoritePlugin.php
Merge branch 'master' into mmn_fixes
[quix0rs-gnu-social.git] / plugins / Favorite / FavoritePlugin.php
index c7a66fe7516dbbc4c4b2bfbea94df94eec62b58f..d3a3fa86f723ad378be45fae1109328fc54ebb94 100644 (file)
@@ -96,7 +96,7 @@ class FavoritePlugin extends ActivityVerbHandlerPlugin
                                          '    modified = "%s" '.
                                          'WHERE user_id = %d '.
                                          'AND notice_id = %d',
-                                         Fave::newUri($fave->user_id, $fave->notice_id, $fave->modified),
+                                         Fave::newUri($fave->getActor(), $fave->getTarget(), $fave->modified),
                                          common_sql_date(strtotime($fave->modified)),
                                          $fave->user_id,
                                          $fave->notice_id));
@@ -185,16 +185,10 @@ class FavoritePlugin extends ActivityVerbHandlerPlugin
     {
         assert($this->isMyActivity($act));
 
-        // If empty, we should've created it ourselves on our node.
-        if (!isset($options['created'])) {
-            $options['created'] = !empty($act->time) ? common_sql_date($act->time) : common_sql_now();
-        }
-
         // We must have an objects[0] here because in isMyActivity we require the count to be == 1
         $actobj = $act->objects[0];
 
         $object = Fave::saveActivityObject($actobj, $stored);
-        $stored->object_type = ActivityUtils::resolveUri($object->getObjectType(), true);
 
         return $object;
     }
@@ -208,7 +202,6 @@ class FavoritePlugin extends ActivityVerbHandlerPlugin
             return true;
         }
 
-        common_debug('Extending activity '.$stored->id.' with '.get_called_class());
         $this->extendActivity($stored, $act, $scoped);
         return false;
     }