]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityverb.php
Merge branch 'master' into social-master
[quix0rs-gnu-social.git] / lib / activityverb.php
index 76f2b84e9ca68d2e4c6b1149b8dfa0f24edf5a0f..513605b620a84356e7c82e2e3ad7c4bf05ff35de 100644 (file)
@@ -42,7 +42,6 @@ if (!defined('STATUSNET')) {
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
  * @link      http://status.net/
  */
-
 class ActivityVerb
 {
     const POST     = 'http://activitystrea.ms/schema/1.0/post';
@@ -60,7 +59,17 @@ class ActivityVerb
     const UNFAVORITE = 'http://ostatus.org/schema/1.0/unfavorite';
     const UNFOLLOW   = 'http://ostatus.org/schema/1.0/unfollow';
     const LEAVE      = 'http://ostatus.org/schema/1.0/leave';
+    const UNTAG      = 'http://ostatus.org/schema/1.0/untag';
 
     // For simple profile-update pings; no content to share.
     const UPDATE_PROFILE = 'http://ostatus.org/schema/1.0/update-profile';
+
+    static function canonical($verb) {
+        $ns = 'http://activitystrea.ms/schema/1.0/';
+        if (substr($verb, 0, mb_strlen($ns)) == $ns) {
+            return substr($verb, mb_strlen($ns));
+        } else {
+            return $verb;
+        }
+    }
 }