aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-07-04 22:05:17 -0700
committerMario Vavti <mario@mariovavti.com>2017-07-05 11:49:05 +0200
commit27c8c74988228ed7a86d09011caed9ed57a7d91a (patch)
treec85b34f8c38ec714aa02421c6b7295cdccb971e2
parent80352dab5f33c691017b555fcf48323eb69b73bc (diff)
downloadvolse-hubzilla-27c8c74988228ed7a86d09011caed9ed57a7d91a.tar.gz
volse-hubzilla-27c8c74988228ed7a86d09011caed9ed57a7d91a.tar.bz2
volse-hubzilla-27c8c74988228ed7a86d09011caed9ed57a7d91a.zip
some sites use the old style ostatus:conversation xml field, check for it.
-rw-r--r--include/feedutils.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index b64a98a7f..d96735c3a 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -393,9 +393,16 @@ function get_atom_elements($feed, $item, &$author) {
$rawcnv = $item->get_item_tags(NAMESPACE_OSTATUS, 'conversation');
if($rawcnv) {
+ // new style
$ostatus_conversation = normalise_id(unxmlify($rawcnv[0]['attribs']['']['ref']));
- set_iconfig($res,'ostatus','conversation',$ostatus_conversation,true);
- logger('ostatus_conversation: ' . $ostatus_conversation, LOGGER_DATA, LOG_INFO);
+ if(! $ostatus_conversation) {
+ // old style
+ $ostatus_conversation = normalise_id(unxmlify($rawcnv[0]['data']));
+ }
+ if($ostatus_conversation) {
+ set_iconfig($res,'ostatus','conversation',$ostatus_conversation,true);
+ logger('ostatus_conversation: ' . $ostatus_conversation, LOGGER_DATA, LOG_INFO);
+ }
}
$ostatus_protocol = (($ostatus_conversation) ? true : false);