Skip to content
Snippets Groups Projects
Commit 7f82daa0 authored by Gabriel Engel's avatar Gabriel Engel
Browse files

removing logs

parent 8c36670d
No related branches found
No related tags found
No related merge requests found
......@@ -94,5 +94,6 @@ const myCommand :Spk.Manifest.Command = (
(key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
(key = "SANDSTORM", value = "1"),
(key = "Statistics_opt_out", value = "true")
(key = "Accounts_AllowUserAvatarChange", value = "false")
]
);
......@@ -35,15 +35,14 @@ Meteor.startup ->
username: decodeURIComponent(req.url.replace(/^\//, '').replace(/\?.*$/, ''))
if params.username[0] isnt '@'
file = RocketChatFileAvatarInstance.getFileWithReadStream encodeURIComponent(params.username)
if not file? and Meteor.settings?.public?.sandstorm
if Meteor.settings?.public?.sandstorm
user = RocketChat.models.Users.findOneByUsername(params.username.replace('.jpg', ''))
if user?.services?.sandstorm?.picture
console.log "Should redirect to: ", user.services.sandstorm.picture
res.setHeader 'Location', user.services.sandstorm.picture
res.writeHead 302
res.end()
return
file = RocketChatFileAvatarInstance.getFileWithReadStream encodeURIComponent(params.username)
else
params.username = params.username.replace '@', ''
......@@ -51,7 +50,6 @@ Meteor.startup ->
res.setHeader 'Content-Disposition', 'inline'
if not file?
res.setHeader 'Content-Type', 'image/svg+xml'
res.setHeader 'Cache-Control', 'public, max-age=0'
res.setHeader 'Expires', '-1'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment