]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use notifyDeferred for tag/untag so that it gets queued offline
authorShashi Gowda <connect2shashi@gmail.com>
Sat, 9 Apr 2011 11:47:32 +0000 (17:17 +0530)
committerShashi Gowda <connect2shashi@gmail.com>
Sat, 9 Apr 2011 11:48:33 +0000 (17:18 +0530)
plugins/OStatus/OStatusPlugin.php

index a4f4a6b8b8fb28011c20a8d95506bfc3bc3a8abb..226e67845701b6a42261a8704c334b6eb837fe06 100644 (file)
@@ -951,6 +951,14 @@ class OStatusPlugin extends Plugin
         return true;
     }
 
+    /**
+     * Notify remote user it has got a new people tag
+     *   - tag verb is queued
+     *   - the subscription is done immediately if not present
+     *
+     * @param Profile_tag $ptag the people tag that was created
+     * @return hook return value
+     */
     function onEndTagProfile($ptag)
     {
         $oprofile = Ostatus_profile::staticGet('profile_id', $ptag->tagged);
@@ -984,7 +992,7 @@ class OStatusPlugin extends Plugin
         $act->objects = array(ActivityObject::fromProfile($tagged));
         $act->target = ActivityObject::fromPeopletag($plist);
 
-        $oprofile->notifyActivity($act, $tagger);
+        $oprofile->notifyDeferred($act, $tagger);
 
         // initiate a PuSH subscription for the person being tagged
         if (!$oprofile->subscribe()) {
@@ -995,6 +1003,15 @@ class OStatusPlugin extends Plugin
         return true;
     }
 
+    /**
+     * Notify remote user that a people tag has been removed
+     *   - untag verb is queued
+     *   - the subscription is undone immediately if not required
+     *     i.e garbageCollect()'d
+     *
+     * @param Profile_tag $ptag the people tag that was deleted
+     * @return hook return value
+     */
     function onEndUntagProfile($ptag)
     {
         $oprofile = Ostatus_profile::staticGet('profile_id', $ptag->tagged);
@@ -1028,7 +1045,7 @@ class OStatusPlugin extends Plugin
         $act->objects = array(ActivityObject::fromProfile($tagged));
         $act->target = ActivityObject::fromPeopletag($plist);
 
-        $oprofile->notifyActivity($act, $tagger);
+        $oprofile->notifyDeferred($act, $tagger);
 
         // unsubscribe to PuSH feed if no more required
         $oprofile->garbageCollect();