From: James Walker Date: Tue, 9 Mar 2010 23:47:20 +0000 (-0500) Subject: remove hard-coded me:env check in magicenvelope X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=06612e35e433109e00167ac62d65299210ef0032;p=quix0rs-gnu-social.git remove hard-coded me:env check in magicenvelope --- diff --git a/plugins/OStatus/lib/magicenvelope.php b/plugins/OStatus/lib/magicenvelope.php index e8835165c0..c927209e4b 100644 --- a/plugins/OStatus/lib/magicenvelope.php +++ b/plugins/OStatus/lib/magicenvelope.php @@ -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; }