summaryrefslogtreecommitdiff
path: root/plugins/OStatus/lib/magicenvelope.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus/lib/magicenvelope.php')
-rw-r--r--plugins/OStatus/lib/magicenvelope.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/OStatus/lib/magicenvelope.php b/plugins/OStatus/lib/magicenvelope.php
index e8835165c..c927209e4 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;
}