Update Inbox and StatusObserver, fix silently rejected direct messages due to saveQuietly which failed to generate a snowflake id

This commit is contained in:
Daniel Supernault 2024-02-23 19:37:02 -07:00
parent eadf2e9d1d
commit 089ba3c471
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1
2 changed files with 9 additions and 1 deletions

View file

@ -38,6 +38,10 @@ class StatusObserver
*/
public function updated(Status $status)
{
if(!in_array($status->scope, ['public', 'unlisted', 'private'])) {
return;
}
if(config('instance.timeline.home.cached')) {
Cache::forget('pf:timelines:home:' . $status->profile_id);
}
@ -55,6 +59,10 @@ class StatusObserver
*/
public function deleted(Status $status)
{
if(!in_array($status->scope, ['public', 'unlisted', 'private'])) {
return;
}
if(config('instance.timeline.home.cached')) {
Cache::forget('pf:timelines:home:' . $status->profile_id);
}

View file

@ -423,7 +423,7 @@ class Inbox
$status->uri = $activity['id'];
$status->object_url = $activity['id'];
$status->in_reply_to_profile_id = $profile->id;
$status->saveQuietly();
$status->save();
$dm = new DirectMessage;
$dm->to_id = $profile->id;