fix default username

This commit is contained in:
Matthias Pfefferle 2023-07-28 00:47:20 +02:00
parent e12cfa44ac
commit 799280a808

View file

@ -211,7 +211,7 @@ class Follower extends Actor {
* @return string The name.
*/
public function get_name() {
if ( isset( $this->name ) ) {
if ( $this->name ) {
return $this->name;
}
@ -226,8 +226,8 @@ class Follower extends Actor {
* @return string The preferred Username.
*/
public function get_preferred_username() {
if ( isset( $this->name ) ) {
return $this->name;
if ( $this->preferred_username ) {
return $this->preferred_username;
}
return $this->extract_name_from_uri();