Sanitize FirstName and LastName fields of an object instead of the nickname when ShowFullName is set to false
Этот коммит содержится в:
@@ -20,9 +20,6 @@ func (o *ExtraMember) Sanitize(options map[string]bool) {
|
|||||||
if len(options) == 0 || !options["email"] {
|
if len(options) == 0 || !options["email"] {
|
||||||
o.Email = ""
|
o.Email = ""
|
||||||
}
|
}
|
||||||
if len(options) == 0 || !options["fullname"] {
|
|
||||||
o.Nickname = ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ChannelExtra struct {
|
type ChannelExtra struct {
|
||||||
|
|||||||
@@ -201,7 +201,8 @@ func (u *User) Sanitize(options map[string]bool) {
|
|||||||
u.Email = ""
|
u.Email = ""
|
||||||
}
|
}
|
||||||
if len(options) != 0 && !options["fullname"] {
|
if len(options) != 0 && !options["fullname"] {
|
||||||
u.Nickname = ""
|
u.FirstName = ""
|
||||||
|
u.LastName = ""
|
||||||
}
|
}
|
||||||
if len(options) != 0 && !options["skypeid"] {
|
if len(options) != 0 && !options["skypeid"] {
|
||||||
// TODO - fill in when SkypeId is added to user model
|
// TODO - fill in when SkypeId is added to user model
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user