]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
remove hard-coded me:env check in magicenvelope
authorJames Walker <walkah@walkah.net>
Tue, 9 Mar 2010 23:47:20 +0000 (18:47 -0500)
committerJames Walker <walkah@walkah.net>
Thu, 11 Mar 2010 19:49:12 +0000 (14:49 -0500)
plugins/OStatus/lib/magicenvelope.php

index e8835165c03b0d3986f6be8b2245be06676bc416..c927209e4bcea76c6cfe724a6b116bf266b7e9e8 100644 (file)
@@ -193,11 +193,12 @@ class MagicEnvelope
 
     public function fromDom($dom)
     {
-        if ($dom->documentElement->tagName == 'entry') {
+        $env_element = $dom->getElementsByTagNameNS(MagicEnvelope::NS, 'env')->item(0);
+        if (!$env_element) {
             $env_element = $dom->getElementsByTagNameNS(MagicEnvelope::NS, 'provenance')->item(0);
-        } else if ($dom->documentElement->tagName == 'me:env') {
-            $env_element = $dom->documentElement;
-        } else {
+        }
+
+        if (!$env_element) {
             return false;
         }