Fix bad condition on hiding email addresses and update user etag to include privacy settings (#3327)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a0cc913b85
Коммит
8f87e60231
@@ -244,8 +244,8 @@ func (u *User) ToJson() string {
|
||||
}
|
||||
|
||||
// Generate a valid strong etag so the browser can cache the results
|
||||
func (u *User) Etag() string {
|
||||
return Etag(u.Id, u.UpdateAt)
|
||||
func (u *User) Etag(showFullName, showEmail bool) string {
|
||||
return Etag(u.Id, u.UpdateAt, showFullName, showEmail)
|
||||
}
|
||||
|
||||
func (u *User) IsOffline() bool {
|
||||
|
||||
@@ -33,7 +33,7 @@ func TestUserJson(t *testing.T) {
|
||||
func TestUserPreSave(t *testing.T) {
|
||||
user := User{Password: "test"}
|
||||
user.PreSave()
|
||||
user.Etag()
|
||||
user.Etag(true, true)
|
||||
}
|
||||
|
||||
func TestUserPreUpdate(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user