From a3c45d47e65c0974c07ede6325c6472b64ac6049 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 6 Jan 2017 13:37:52 -0800 Subject: 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. --- include/feedutils.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/feedutils.php') 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 .= '' . "\r\n"; + $o .= '' . xmlify($item['parent_mid']) . '' . "\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)); -- cgit v1.2.3