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

adding picture provider

parent 342c7808
No related branches found
No related tags found
No related merge requests found
......@@ -44,10 +44,11 @@ Meteor.startup ->
if not file?
if Meteor.settings.public.sandstorm
if sandstormPictureUrl = RocketChat.models.Users.findOneByUsername(params.username.replace('.jpg', '')).services.sandstorm.picture?
console.log "Should redirect to: ", sandstormPictureUrl
res.setHeader 'Location', sandstormPictureUrl
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
......
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