sharing now works for real.

This commit is contained in:
nilsding 2014-12-13 15:38:16 +01:00
parent 013d1d44b7
commit 633e133713
2 changed files with 2 additions and 3 deletions

View File

@ -47,10 +47,10 @@ class Ajax::InboxController < ApplicationController
end
# sharing
share_to = JSON.parse params[:share]
Thread.new do
share_to = JSON.parse params[:share]
current_user.services.each do |service|
service.post answer if share_to.include? service.provider
service.post(answer) if share_to.include? service.provider
end
end

View File

@ -35,7 +35,6 @@ class Services::Twitter < Service
host: APP_CONFIG['hostname'],
protocol: (APP_CONFIG['https'] ? :https : :http)
)
Rails.logger.debug "answer_url => #{answer_url}"
"#{question_content[0..55]}#{'…' if question_content.length > 56}" \
"#{answer_content[0..55]}#{'…' if answer_content.length > 56} #{answer_url}"
end