mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Sanitize FirstName and LastName fields of an object instead of the nickname when ShowFullName is set to false
This commit is contained in:
@@ -20,9 +20,6 @@ func (o *ExtraMember) Sanitize(options map[string]bool) {
|
||||
if len(options) == 0 || !options["email"] {
|
||||
o.Email = ""
|
||||
}
|
||||
if len(options) == 0 || !options["fullname"] {
|
||||
o.Nickname = ""
|
||||
}
|
||||
}
|
||||
|
||||
type ChannelExtra struct {
|
||||
|
||||
@@ -201,7 +201,8 @@ func (u *User) Sanitize(options map[string]bool) {
|
||||
u.Email = ""
|
||||
}
|
||||
if len(options) != 0 && !options["fullname"] {
|
||||
u.Nickname = ""
|
||||
u.FirstName = ""
|
||||
u.LastName = ""
|
||||
}
|
||||
if len(options) != 0 && !options["skypeid"] {
|
||||
// TODO - fill in when SkypeId is added to user model
|
||||
|
||||
Reference in New Issue
Block a user