From 2593cdeed911c6ac3747f1205dd74baf9ccde9ec Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 31 Aug 2021 00:40:41 -0600 Subject: [PATCH] Update Status model, add poll relation and allow up to 2 urls to autolink --- app/Status.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Status.php b/app/Status.php index e14802406..7befcb02b 100644 --- a/app/Status.php +++ b/app/Status.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; use Pixelfed\Snowflake\HasSnowflakePrimary; use App\Http\Controllers\StatusController; use Illuminate\Database\Eloquent\SoftDeletes; +use App\Models\Poll; class Status extends Model { @@ -48,7 +49,7 @@ class Status extends Model const MAX_HASHTAGS = 30; - const MAX_LINKS = 0; + const MAX_LINKS = 2; public function profile() { @@ -414,4 +415,8 @@ class Status extends Model return $this->hasOne(DirectMessage::class); } + public function poll() + { + return $this->hasOne(Poll::class); + } }