mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-12 17:44:31 +00:00
Update Inbox and StatusObserver, fix silently rejected direct messages due to saveQuietly which failed to generate a snowflake id
This commit is contained in:
parent
eadf2e9d1d
commit
089ba3c471
2 changed files with 9 additions and 1 deletions
|
@ -38,6 +38,10 @@ class StatusObserver
|
||||||
*/
|
*/
|
||||||
public function updated(Status $status)
|
public function updated(Status $status)
|
||||||
{
|
{
|
||||||
|
if(!in_array($status->scope, ['public', 'unlisted', 'private'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(config('instance.timeline.home.cached')) {
|
if(config('instance.timeline.home.cached')) {
|
||||||
Cache::forget('pf:timelines:home:' . $status->profile_id);
|
Cache::forget('pf:timelines:home:' . $status->profile_id);
|
||||||
}
|
}
|
||||||
|
@ -55,6 +59,10 @@ class StatusObserver
|
||||||
*/
|
*/
|
||||||
public function deleted(Status $status)
|
public function deleted(Status $status)
|
||||||
{
|
{
|
||||||
|
if(!in_array($status->scope, ['public', 'unlisted', 'private'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(config('instance.timeline.home.cached')) {
|
if(config('instance.timeline.home.cached')) {
|
||||||
Cache::forget('pf:timelines:home:' . $status->profile_id);
|
Cache::forget('pf:timelines:home:' . $status->profile_id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -423,7 +423,7 @@ class Inbox
|
||||||
$status->uri = $activity['id'];
|
$status->uri = $activity['id'];
|
||||||
$status->object_url = $activity['id'];
|
$status->object_url = $activity['id'];
|
||||||
$status->in_reply_to_profile_id = $profile->id;
|
$status->in_reply_to_profile_id = $profile->id;
|
||||||
$status->saveQuietly();
|
$status->save();
|
||||||
|
|
||||||
$dm = new DirectMessage;
|
$dm = new DirectMessage;
|
||||||
$dm->to_id = $profile->id;
|
$dm->to_id = $profile->id;
|
||||||
|
|
Loading…
Reference in a new issue