mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-26 01:36:43 +00:00
Update Inbox, improve story attribute collection
This commit is contained in:
parent
d1c297d1ad
commit
06bee36c52
1 changed files with 22 additions and 2 deletions
|
@ -713,9 +713,11 @@ class Inbox
|
||||||
if(!$status) {
|
if(!$status) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if($status->scope && $status->scope != 'direct') {
|
if($status->scope && in_array($status->scope, ['public', 'unlisted', 'private'])) {
|
||||||
|
if($status->type && !in_array($status->type, ['story:reaction', 'story:reply', 'reply'])) {
|
||||||
FeedRemoveRemotePipeline::dispatch($status->id, $status->profile_id)->onQueue('feed');
|
FeedRemoveRemotePipeline::dispatch($status->id, $status->profile_id)->onQueue('feed');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
RemoteStatusDelete::dispatch($status)->onQueue('high');
|
RemoteStatusDelete::dispatch($status)->onQueue('high');
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
|
@ -985,9 +987,18 @@ class Inbox
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$url = $id;
|
||||||
|
|
||||||
|
if(str_ends_with($url, '/activity')) {
|
||||||
|
$url = substr($url, 0, -9);
|
||||||
|
}
|
||||||
|
|
||||||
$status = new Status;
|
$status = new Status;
|
||||||
$status->profile_id = $actorProfile->id;
|
$status->profile_id = $actorProfile->id;
|
||||||
$status->type = 'story:reaction';
|
$status->type = 'story:reaction';
|
||||||
|
$status->url = $url;
|
||||||
|
$status->uri = $url;
|
||||||
|
$status->object_url = $url;
|
||||||
$status->caption = $text;
|
$status->caption = $text;
|
||||||
$status->rendered = $text;
|
$status->rendered = $text;
|
||||||
$status->scope = 'direct';
|
$status->scope = 'direct';
|
||||||
|
@ -1094,11 +1105,20 @@ class Inbox
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$url = $id;
|
||||||
|
|
||||||
|
if(str_ends_with($url, '/activity')) {
|
||||||
|
$url = substr($url, 0, -9);
|
||||||
|
}
|
||||||
|
|
||||||
$status = new Status;
|
$status = new Status;
|
||||||
$status->profile_id = $actorProfile->id;
|
$status->profile_id = $actorProfile->id;
|
||||||
$status->type = 'story:reply';
|
$status->type = 'story:reply';
|
||||||
$status->caption = $text;
|
$status->caption = $text;
|
||||||
$status->rendered = $text;
|
$status->rendered = $text;
|
||||||
|
$status->url = $url;
|
||||||
|
$status->uri = $url;
|
||||||
|
$status->object_url = $url;
|
||||||
$status->scope = 'direct';
|
$status->scope = 'direct';
|
||||||
$status->visibility = 'direct';
|
$status->visibility = 'direct';
|
||||||
$status->in_reply_to_profile_id = $story->profile_id;
|
$status->in_reply_to_profile_id = $story->profile_id;
|
||||||
|
|
Loading…
Reference in a new issue