]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Better verb comparison
authorEvan Prodromou <evan@e14n.com>
Sun, 30 Jun 2013 16:08:11 +0000 (12:08 -0400)
committerEvan Prodromou <evan@e14n.com>
Sun, 30 Jun 2013 16:08:11 +0000 (12:08 -0400)
lib/activity.php

index 5074b6d205cdff4e2102f554cfe0f561170b2540..7546e2cd432c2fc6f8f82c6ab0402d3cab8e95ef 100644 (file)
@@ -389,7 +389,8 @@ class Activity
 
             if ($object instanceof Activity) {
                 // Sharing a post activity is more like sharing the original object
-                if ($this->verb == 'share' && $object->verb == 'post') {
+                if (ActivityVerb::canonical($this->verb) == ActivityVerb::canonical(ActivityVerb::SHARE) &&
+                    ActivityVerb::canonical($object->verb) == ActivityVerb::canonical(ActivityVerb::POST)) {
                     // XXX: Here's one for the obfuscation record books
                     $object = $object->objects[0];
                 }