Skip to content

Commit

Permalink
Fixing problem with config loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jespino committed May 24, 2020
1 parent d705b34 commit 09f252e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions server/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,21 @@ func signClaims(secret string, claims *Claims) (string, error) {
}

func (p *Plugin) updateJwtUserInfo(jwtToken string, user *model.User) (string, error) {
config := p.API.GetConfig()
secret := p.getConfiguration().JitsiAppSecret

claims, err := verifyJwt(secret, jwtToken)
if err != nil {
return "", err
}

user.Sanitize(config.GetSanitizeOptions())

config := p.API.GetConfig()
if config.PrivacySettings.ShowFullName == nil || *config.PrivacySettings.ShowFullName == false {
user.FirstName = ""
user.LastName = ""
}
if config.PrivacySettings.ShowEmailAddress == nil || *config.PrivacySettings.ShowEmailAddress == false {
user.Email = ""
}
newContext := Context{
User: User{
Avatar: fmt.Sprintf("%s/api/v4/users/%s/image?_=%d", *config.ServiceSettings.SiteURL, user.Id, user.LastPictureUpdate),
Expand Down

0 comments on commit 09f252e

Please sign in to comment.