mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 08:13:16 +00:00
Update Status model, add poll relation and allow up to 2 urls to autolink
This commit is contained in:
parent
ef8e38298f
commit
2593cdeed9
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue