aboutsummaryrefslogtreecommitdiffstats
path: root/include/feedutils.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-06 13:37:52 -0800
committerzotlabs <mike@macgirvin.com>2017-01-06 13:42:45 -0800
commita3c45d47e65c0974c07ede6325c6472b64ac6049 (patch)
treed83371923cd4b13e5dac7c25bb2ed9f6e0e4f317 /include/feedutils.php
parent6db2561eda67d038139e885b07138706ef8af75e (diff)
downloadvolse-hubzilla-a3c45d47e65c0974c07ede6325c6472b64ac6049.tar.gz
volse-hubzilla-a3c45d47e65c0974c07ede6325c6472b64ac6049.tar.bz2
volse-hubzilla-a3c45d47e65c0974c07ede6325c6472b64ac6049.zip
add the ostatus:conversation element which is now more or less required by GNU-Social to work around some short-comings of the OStatus delivery model when it comes to conversational message grouping. If this element isn't there, message replies will not get grouped with the parent specified in thr:in-reply-to, which exists to group conversations together. The reasoning being that due to the point-to-point delivery model, a reply could arrive on one site which does not have a copy of the parent specified by thr:in-reply-to. Hence further replies arriving on this site are grouped with the first arrived comment as the parent. Since this project doesn't allow comments which don't have top-level parents, we can just set it to the parent-mid and save being forced to create a new database structure for orphan children acting as parents.
Diffstat (limited to 'include/feedutils.php')
-rw-r--r--include/feedutils.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index be59c3c38..6d65f9fe8 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -1181,6 +1181,9 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
}
+ $o .= '<link rel="ostatus:conversation" href="' . xmlify($item['parent_mid']) . '"/>' . "\r\n";
+ $o .= '<ostatus:conversation>' . xmlify($item['parent_mid']) . '</ostatus:conversation>' . "\r\n";
+
if(activity_match($item['obj_type'],ACTIVITY_OBJ_EVENT) && activity_match($item['verb'],ACTIVITY_POST)) {
$obj = ((is_array($item['obj'])) ? $item['obj'] : json_decode($item['obj'],true));