Update Status model

pull/665/head
Daniel Supernault 2018-12-23 19:07:49 -07:00
rodzic b86eb83cc0
commit a6b7898d98
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -19,7 +19,7 @@ class Status extends Model
*/ */
protected $dates = ['deleted_at']; protected $dates = ['deleted_at'];
protected $fillable = ['profile_id', 'visibility', 'in_reply_to_id', 'reblog_of_id']; protected $fillable = ['profile_id', 'visibility', 'in_reply_to_id', 'reblog_of_id', 'type'];
const STATUS_TYPES = [ const STATUS_TYPES = [
'text', 'text',
@ -90,13 +90,13 @@ class Status extends Model
public function url() public function url()
{ {
if($this->url) { if($this->uri) {
return $this->url; return $this->uri;
} }
$id = $this->id; $id = $this->id;
$username = $this->profile->username; $username = $this->profile->username;
$path = config('app.url')."/p/{$username}/{$id}"; $path = url(config('app.url')."/p/{$username}/{$id}");
return url($path); return $path;
} }
public function permalink($suffix = '/activity') public function permalink($suffix = '/activity')