Fix creating of Facebook alterative content

This commit is contained in:
Jonny Barnes 2018-02-15 18:13:14 +00:00
parent 7f8adc1220
commit 5f332489d1

View file

@ -370,7 +370,7 @@ class Note extends Model
}
/**
* Show a specific form of the note for facebook.
* Show a specific form of the note for Facebook.
*
* That is we swap the contacts names for their known Facebook usernames.
*
@ -378,6 +378,10 @@ class Note extends Model
*/
public function getFacebookContentAttribute(): ?string
{
if ($this->contacts === null) {
return null;
}
if (count($this->contacts) === 0) {
return null;
}