1
0
Fork 0

Update Status model, add poll relation and allow up to 2 urls to autolink

This commit is contained in:
Daniel Supernault 2021-08-31 00:40:41 -06:00
parent ef8e38298f
commit 2593cdeed9
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 6 additions and 1 deletions

View File

@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
use Pixelfed\Snowflake\HasSnowflakePrimary; use Pixelfed\Snowflake\HasSnowflakePrimary;
use App\Http\Controllers\StatusController; use App\Http\Controllers\StatusController;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Poll;
class Status extends Model class Status extends Model
{ {
@ -48,7 +49,7 @@ class Status extends Model
const MAX_HASHTAGS = 30; const MAX_HASHTAGS = 30;
const MAX_LINKS = 0; const MAX_LINKS = 2;
public function profile() public function profile()
{ {
@ -414,4 +415,8 @@ class Status extends Model
return $this->hasOne(DirectMessage::class); return $this->hasOne(DirectMessage::class);
} }
public function poll()
{
return $this->hasOne(Poll::class);
}
} }