Update Status model

This commit is contained in:
Daniel Supernault 2020-11-18 19:19:07 -07:00
parent f15b8f8f5a
commit fa8fbb7e86
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 6 additions and 0 deletions

View file

@ -407,4 +407,9 @@ class Status extends Model
return $this->belongsTo(Place::class);
}
public function directMessage()
{
return $this->hasOne(DirectMessage::class);
}
}

View file

@ -508,6 +508,7 @@ class Inbox
if(!$status) {
return;
}
$status->directMessage()->delete();
$status->media()->delete();
$status->likes()->delete();
$status->shares()->delete();