Use username if display name is blank (#11)
This commit is contained in:
parent
a5c88a1034
commit
7c6804c2af
|
@ -80,6 +80,13 @@ namespace JobsJobsJobs.Server
|
||||||
$"Profiles must be from noagendasocial.com; yours is {profileResponse.AccountName}");
|
$"Profiles must be from noagendasocial.com; yours is {profileResponse.AccountName}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the user hasn't filled in a display name, use the username as the display name.
|
||||||
|
// (this is what Mastodon does)
|
||||||
|
if (string.IsNullOrWhiteSpace(profileResponse.DisplayName))
|
||||||
|
{
|
||||||
|
profileResponse.DisplayName = profileResponse.Username;
|
||||||
|
}
|
||||||
|
|
||||||
return Result<MastodonAccount>.AsOk(profileResponse);
|
return Result<MastodonAccount>.AsOk(profileResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user