]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityverb.php
??? Not callable?
[quix0rs-gnu-social.git] / lib / activityverb.php
index 264351308b55b60c25139abb50a81b7e286d243e..513605b620a84356e7c82e2e3ad7c4bf05ff35de 100644 (file)
@@ -59,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;
+        }
+    }
 }