]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use simple relative object and verb references
authorZach Copley <zach@status.net>
Thu, 17 Feb 2011 00:44:02 +0000 (16:44 -0800)
committerZach Copley <zach@status.net>
Thu, 17 Feb 2011 00:44:02 +0000 (16:44 -0800)
lib/activity.php
lib/activityobject.php

index e6fefca28f9a9523a9dfeb037d7e2117674ca899..e1d5e25e5ee71a69e6b2e053636bb7aefc54e301 100644 (file)
@@ -383,7 +383,10 @@ class Activity
         // updatedTime <-- should we use? spec says activity MAY have this
 
         // verb
-        $activity['verb'] = $this->verb;
+        //
+        // We can probably use the whole schema URL here but probably the
+        // relative simple name is easier to parse
+        $activity['verb'] = substr($this->verb, strrpos($this->verb, '/') + 1);
 
         // TODO: extensions (ActivityContext, OStatus stuff, etc.)
 
index 17753f0df4aefe86371bf087efa08cbf5d8608e5..7847a5d640a52b624d24e993d1026078ad2cc311 100644 (file)
@@ -683,7 +683,10 @@ class ActivityObject
         }
 
         // objectType
-        $object['type'] = $this->type;
+        //
+        // We can probably use the whole schema URL here but probably the
+        // relative simple name is easier to parse
+        $object['type'] = substr($this->type, strrpos($this->type, '/') + 1);
 
         // summary
         $object['summary'] = $this->summary;