mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
nomadic and trheading updates
This commit is contained in:
parent
87b1b8a869
commit
4d4af4f1b5
4 changed files with 40 additions and 14 deletions
|
@ -978,7 +978,11 @@ class Activity {
|
|||
}
|
||||
|
||||
if ($locations) {
|
||||
$ret['zot:alsoKnownAs'] = $locations;
|
||||
if (count($locations) === 1) {
|
||||
$locations = array_shift($locations);
|
||||
}
|
||||
$ret['copiedTo'] = $locations;
|
||||
$ret['alsoKnownAs'] = $locations;
|
||||
}
|
||||
|
||||
$cp = get_cover_photo($c['channel_id'],'array');
|
||||
|
|
|
@ -942,20 +942,40 @@ class ThreadItem {
|
|||
// we find among the respondents.
|
||||
|
||||
if ($this->is_toplevel() && (! $this->data['owner']['abook_id'])) {
|
||||
$children = $this->data['children'];
|
||||
if($children) {
|
||||
foreach($children as $child) {
|
||||
if($child['author']['abook_id'] && (! intval($child['author']['abook_self']))) {
|
||||
$this->owner_url = chanlink_hash($child['author']['xchan_hash']);
|
||||
$this->owner_photo = $child['author']['xchan_photo_m'];
|
||||
$this->owner_name = $child['author']['xchan_name'];
|
||||
if ($this->data['children']) {
|
||||
$friend = $this->find_a_friend($this->data['children']);
|
||||
if ($friend) {
|
||||
$this->owner_url = $friend['url'];
|
||||
$this->owner_photo = $friend['photo'];
|
||||
$this->owner_name = $friend['name'];
|
||||
$this->wall_to_wall = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function find_a_friend($items) {
|
||||
$ret = null;
|
||||
if ($items) {
|
||||
foreach ($items as $child) {
|
||||
if ($child['author']['abook_id'] && (! intval($child['author']['abook_self']))) {
|
||||
return [
|
||||
'url' => chanlink_hash($child['author']['xchan_hash']),
|
||||
'photo' => $child['author']['xchan_photo_m'],
|
||||
'name' => $child['author']['xchan_name']
|
||||
];
|
||||
if ($child['children']) {
|
||||
$ret = $this->find_a_friend($child['children']);
|
||||
if ($ret) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
private function is_wall_to_wall() {
|
||||
return $this->wall_to_wall;
|
||||
|
|
|
@ -17,6 +17,9 @@ class Apschema extends \Zotlabs\Web\Controller {
|
|||
'ostatus' => 'http://ostatus.org#',
|
||||
'conversation' => 'ostatus:conversation',
|
||||
'sensitive' => 'as:sensitive',
|
||||
'movedTo' => 'as:movedTo',
|
||||
'copiedTo' => 'as:copiedTo',
|
||||
'alsoKnownAs' => 'as:alsoKnownAs',
|
||||
'inheritPrivacy' => 'as:inheritPrivacy',
|
||||
'commentPolicy' => 'zot:commentPolicy',
|
||||
'topicalCollection' => 'zot:topicalCollection',
|
||||
|
@ -24,7 +27,6 @@ class Apschema extends \Zotlabs\Web\Controller {
|
|||
'emojiReaction' => 'zot:emojiReaction',
|
||||
'expires' => 'zot:expires',
|
||||
'directMessage' => 'zot:directMessage',
|
||||
'alsoKnownAs' => 'zot:alsoKnownAs',
|
||||
'replyTo' => 'zot:replyTo'
|
||||
]
|
||||
];
|
||||
|
|
2
boot.php
2
boot.php
|
@ -470,7 +470,7 @@ define ( 'NAMESPACE_YMEDIA', 'http://search.yahoo.com/mrss/' );
|
|||
|
||||
define ( 'ACTIVITYSTREAMS_JSONLD_REV', 'https://www.w3.org/ns/activitystreams' );
|
||||
|
||||
define ( 'ZOT_APSCHEMA_REV', '/apschema/v1.12' );
|
||||
define ( 'ZOT_APSCHEMA_REV', '/apschema/v1.13' );
|
||||
|
||||
/**
|
||||
* activity stream defines
|
||||
|
|
Loading…
Reference in a new issue