mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update Status model
This commit is contained in:
parent
b86eb83cc0
commit
a6b7898d98
1 changed files with 5 additions and 5 deletions
|
@ -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')
|
||||||
|
|
Loading…
Reference in a new issue