Merge pull request #1 from skiprope/master
Don't tag people in questions with twitter
This commit is contained in:
commit
711b8fd457
|
@ -28,7 +28,7 @@ class Services::Twitter < Service
|
||||||
|
|
||||||
def prepare_tweet(answer)
|
def prepare_tweet(answer)
|
||||||
# TODO: improve this.
|
# TODO: improve this.
|
||||||
question_content = twitter_markdown answer.question.content
|
question_content = twitter_markdown answer.question.content.gsub(/\@(\w+)/, '\1')
|
||||||
answer_content = twitter_markdown answer.content
|
answer_content = twitter_markdown answer.content
|
||||||
answer_url = show_user_answer_url(
|
answer_url = show_user_answer_url(
|
||||||
id: answer.id,
|
id: answer.id,
|
||||||
|
@ -39,4 +39,4 @@ class Services::Twitter < Service
|
||||||
"#{question_content[0..54]}#{'…' if question_content.length > 55}" \
|
"#{question_content[0..54]}#{'…' if question_content.length > 55}" \
|
||||||
" — #{answer_content[0..55]}#{'…' if answer_content.length > 56} #{answer_url}"
|
" — #{answer_content[0..55]}#{'…' if answer_content.length > 56} #{answer_url}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue