We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1a158c commit 7d1d708Copy full SHA for 7d1d708
server/tables/tables.go
@@ -312,12 +312,17 @@ func (u *User) TableName() string {
312
}
313
314
func (u *User) ToProto() *uspb.DisplayUser {
315
+ name := strings.TrimSpace(u.FirstName + " " + u.LastName)
316
+ // Use the github username as the name, if no name is set.
317
+ if name == "" && strings.HasPrefix(u.SubID, "https://github.com/") {
318
+ name = strings.TrimPrefix(u.SubID, "https://github.com/")
319
+ }
320
return &uspb.DisplayUser{
321
UserId: &uspb.UserId{
322
Id: u.UserID,
323
},
324
Name: &uspb.Name{
- Full: strings.TrimSpace(u.FirstName + " " + u.LastName),
325
+ Full: name,
326
First: u.FirstName,
327
Last: u.LastName,
328
0 commit comments