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

pull/2895/head
Daniel Supernault 2021-08-31 00:40:41 -06:00
rodzic ef8e38298f
commit 2593cdeed9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -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);
}
}