mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:55:19 +00:00
remove nav link override, turn announce activities into sourced items
This commit is contained in:
parent
baf98a20f1
commit
4af3f25c15
4 changed files with 18 additions and 7 deletions
|
@ -1585,6 +1585,13 @@ class Activity {
|
|||
}
|
||||
self::actor_store($announced_actor['id'],$announced_actor);
|
||||
$s['author_xchan'] = $announced_actor['id'];
|
||||
|
||||
// Set the following to make this item act like a sourced item; comments will then be relayed to the sender
|
||||
// as well as back to the original author
|
||||
|
||||
$s['source_xchan'] = $announced_actor['id'];
|
||||
$s['item_uplink'] = 1;
|
||||
|
||||
}
|
||||
|
||||
if(! $s['created'])
|
||||
|
|
|
@ -83,7 +83,7 @@ class Inbox extends Controller {
|
|||
Activity::actor_store($AS->obj['id'],$AS->obj);
|
||||
}
|
||||
|
||||
if(is_array($AS->obj['actor']) && array_key_exists('id',$AS->obj['actor']) && $AS->obj['actor']['id'] !== $AS->actor['id']) {
|
||||
if(is_array($AS->obj) && is_array($AS->obj['actor']) && array_key_exists('id',$AS->obj['actor']) && $AS->obj['actor']['id'] !== $AS->actor['id']) {
|
||||
Activity::actor_store($AS->obj['actor']['id'],$AS->obj['actor']);
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,13 @@ class Inbox extends Controller {
|
|||
case 'Like':
|
||||
case 'Dislike':
|
||||
case 'Announce':
|
||||
$item = Activity::decode_note($AS);
|
||||
// These require a resolvable object structure
|
||||
if(is_array($AS->obj)) {
|
||||
$item = Activity::decode_note($AS);
|
||||
}
|
||||
else {
|
||||
logger('unresolved object: ' . print_r($AS->obj,true));
|
||||
}
|
||||
break;
|
||||
case 'Undo':
|
||||
if($AS->obj & $AS->obj['type'] === 'Follow') {
|
||||
|
|
|
@ -101,7 +101,9 @@ class Share extends \Zotlabs\Web\Controller {
|
|||
$arr['summary'] = $item['summary'];
|
||||
$arr['body'] = $item['body'];
|
||||
$arr['author_xchan'] = $item['author_xchan'];
|
||||
$arr['owner_xchan'] = $channel['channel_hash'];
|
||||
$arr['owner_xchan'] = $channel['channel_hash'];
|
||||
$arr['source_xchan'] = $item['author_xchan'];
|
||||
$arr['item_uplink'] = 1;
|
||||
$arr['obj'] = $item['obj'];
|
||||
$arr['obj_type'] = $item['obj_type'];
|
||||
$arr['verb'] = 'Announce';
|
||||
|
|
|
@ -106,10 +106,6 @@ a,
|
|||
color: $link_colour;
|
||||
}
|
||||
|
||||
.nav-link.active, .show > .nav-link {
|
||||
background-color: $link_colour !important;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus,
|
||||
.fakelink:hover,
|
||||
|
|
Loading…
Reference in a new issue