diff options
author | zotlabs <mike@macgirvin.com> | 2017-07-04 22:05:17 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-07-04 22:05:17 -0700 |
commit | f3816836e5943868cb395746cbf3310e5e4bcb7f (patch) | |
tree | 26707fe804915f9cc1defd784dbf0b46c2bf9cd9 /include | |
parent | d18427a522a212dceae85a95c304fef8bca721b2 (diff) | |
download | volse-hubzilla-f3816836e5943868cb395746cbf3310e5e4bcb7f.tar.gz volse-hubzilla-f3816836e5943868cb395746cbf3310e5e4bcb7f.tar.bz2 volse-hubzilla-f3816836e5943868cb395746cbf3310e5e4bcb7f.zip |
some sites use the old style ostatus:conversation xml field, check for it.
Diffstat (limited to 'include')
-rw-r--r-- | include/feedutils.php | 11 |
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); |