remove nav link override, turn announce activities into sourced items

This commit is contained in:
zotlabs 2018-10-11 21:05:30 -07:00
parent baf98a20f1
commit 4af3f25c15
4 changed files with 18 additions and 7 deletions

View file

@ -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'])

View file

@ -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') {

View file

@ -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';

View file

@ -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,