[COMPONENT][Avatar] Small refactor

This commit is contained in:
2021-12-04 11:56:27 +00:00
parent 9512890264
commit 969df371dd
3 changed files with 8 additions and 3 deletions

View File

@@ -213,7 +213,12 @@ class Note extends Entity
public function getActorAvatarUrl(string $size = 'full'): string
{
return Avatar::getAvatarUrl($this->getActorId(), $size);
return Avatar::getUrl($this->getActorId(), $size);
}
public static function getFromId(int $note_id): self
{
return Cache::get("note-{$note_id}", fn () => DB::findOneBy('note', ['id' => $note_id]));
}
public function getNoteLanguageShortDisplay(): string