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.
This commit is contained in:
parent
6db2561eda
commit
a3c45d47e6
@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user