mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 07:15:13 +00:00
Merge branch 'dev' of /home/macgirvin/zap.macgirvin.com into zap
This commit is contained in:
commit
097a0e5adc
3 changed files with 28 additions and 5 deletions
|
@ -1391,7 +1391,7 @@ class Activity {
|
|||
$s['owner_xchan'] = $act->actor['id'];
|
||||
$s['author_xchan'] = $act->actor['id'];
|
||||
|
||||
self::actor_store($act->actor['id'],$act->actor);
|
||||
// self::actor_store($act->actor['id'],$act->actor);
|
||||
|
||||
$s['mid'] = $act->obj['id'];
|
||||
$s['parent_mid'] = $act->parent_id;
|
||||
|
|
|
@ -1741,15 +1741,33 @@ class Libzot {
|
|||
|
||||
logger($AS->debug());
|
||||
|
||||
|
||||
$r = q("select hubloc_hash from hubloc where hubloc_id_url = '%s' limit 1",
|
||||
dbesc($AS->actor['id'])
|
||||
);
|
||||
|
||||
if(! $r) {
|
||||
logger('FOF Activity: no actor');
|
||||
continue;
|
||||
$y = import_author_xchan([ 'url' => $AS->actor['id'] ]);
|
||||
if($y) {
|
||||
$r = q("select hubloc_hash from hubloc where hubloc_id_url = '%s' limit 1",
|
||||
dbesc($AS->actor['id'])
|
||||
);
|
||||
}
|
||||
if(! $r) {
|
||||
logger('FOF Activity: no actor');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if($AS->obj['actor'] && $AS->obj['actor']['id'] && $AS->obj['actor']['id'] !== $AS->actor['id']) {
|
||||
$y = import_author_xchan([ 'url' => $AS->obj['actor']['id'] ]);
|
||||
if(! $y) {
|
||||
logger('FOF Activity: no object actor');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($r) {
|
||||
$arr['author_xchan'] = $r[0]['hubloc_hash'];
|
||||
}
|
||||
|
@ -2432,6 +2450,10 @@ class Libzot {
|
|||
// we may only end up with one; which results in posts with no author name or photo and are a bit
|
||||
// of a hassle to repair. If either or both are missing, do a full discovery probe.
|
||||
|
||||
if(! array_key_exists('id',$x)) {
|
||||
return import_author_activitypub($x);
|
||||
}
|
||||
|
||||
$hash = self::make_xchan_hash($x['id'],$x['key']);
|
||||
|
||||
$desturl = $x['url'];
|
||||
|
|
|
@ -35,8 +35,9 @@ class Channel extends Controller {
|
|||
if(! $which) {
|
||||
if(local_channel()) {
|
||||
$channel = App::get_channel();
|
||||
if($channel && $channel['channel_address'])
|
||||
$which = $channel['channel_address'];
|
||||
if($channel && $channel['channel_address']) {
|
||||
$which = $channel['channel_address'];
|
||||
}
|
||||
}
|
||||
}
|
||||
if(! $which) {
|
||||
|
|
Loading…
Reference in a new issue