mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
better contact info
This commit is contained in:
parent
1ffcfb8487
commit
55a245c290
1 changed files with 17 additions and 2 deletions
|
@ -16,12 +16,27 @@ post '/contact' do
|
|||
if !@errors.empty?
|
||||
erb :'contact'
|
||||
else
|
||||
body = params[:body]
|
||||
|
||||
if current_site
|
||||
body = "current username: #{current_site.username}\n\n" + body
|
||||
if parent_site != current_site
|
||||
body = "parent username: #{parent_site.username}\n\n" + body
|
||||
end
|
||||
end
|
||||
|
||||
if current_site.supporter?
|
||||
subject = "[Neocities Supporter Contact]: #{params[:subject]}"
|
||||
else
|
||||
subject = "[Neocities Contact]: #{params[:subject]}"
|
||||
end
|
||||
|
||||
EmailWorker.perform_async({
|
||||
from: 'web@neocities.org',
|
||||
reply_to: params[:email],
|
||||
to: 'contact@neocities.org',
|
||||
subject: "[Neocities Contact]: #{params[:subject]}",
|
||||
body: params[:body],
|
||||
subject: subject,
|
||||
body: body,
|
||||
no_footer: true
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue