X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Factivityverb.php;h=513605b620a84356e7c82e2e3ad7c4bf05ff35de;hb=77d780a59e45701839f77a7d15996c90a07b2bd5;hp=76f2b84e9ca68d2e4c6b1149b8dfa0f24edf5a0f;hpb=cd29d3d646379aa9a1352035973c8e379cc7f42b;p=quix0rs-gnu-social.git diff --git a/lib/activityverb.php b/lib/activityverb.php index 76f2b84e9c..513605b620 100644 --- a/lib/activityverb.php +++ b/lib/activityverb.php @@ -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; + } + } }