]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Notices for faves are already sent as they are notices now.
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 3 Feb 2015 15:44:13 +0000 (16:44 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 3 Feb 2015 15:44:13 +0000 (16:44 +0100)
plugins/OStatus/OStatusPlugin.php

index 15af953b8cc1853cf74ed764c7e7258a29cc6983..86d5bd733749f70abf4192ef1c0b6e37d6a24166 100644 (file)
@@ -867,42 +867,6 @@ class OStatusPlugin extends Plugin
         $oprofile->notifyActivity($act, $user);
     }
 
-    /**
-     * Notify remote users when their notices get favorited.
-     *
-     * @param Profile or User $profile of local user doing the faving
-     * @param Notice $notice being favored
-     * @return hook return value
-     */
-    function onEndFavorNotice(Profile $profile, Notice $notice)
-    {
-        // Only distribute local users' favor actions, remote users
-        // will have already distributed theirs.
-        if (!$profile->isLocal()) {
-            return true;
-        }
-
-        $oprofile = Ostatus_profile::getKV('profile_id', $notice->profile_id);
-        if (!$oprofile instanceof Ostatus_profile) {
-            return true;
-        }
-
-        $fav = Fave::pkeyGet(array('user_id' => $profile->id,
-                                   'notice_id' => $notice->id));
-
-        if (!$fav instanceof Fave) {
-            // That's weird.
-            // TODO: Make pkeyGet throw exception, since this is a critical failure.
-            return true;
-        }
-
-        $act = $fav->asActivity();
-
-        $oprofile->notifyActivity($act, $profile);
-
-        return true;
-    }
-
     /**
      * Notify remote user it has got a new people tag
      *   - tag verb is queued