Fix twitter length issue in bufferizer (#390)

This commit is contained in:
Ben Halpern 2018-06-05 12:29:25 -04:00 committed by GitHub
parent d30e5f63ea
commit dfe93e5509
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@ class Bufferizer
def twitter_buffer_text
twit_name = @article.user.twitter_username
if twit_name.present? && @text.size < 230
if twit_name.present? && @text.size < 245
"#{@text}\n{ author: @#{twit_name} }\nhttps://dev.to#{@article.path}"
else
"#{@text} https://dev.to#{@article.path}"

View file

@ -71,7 +71,7 @@
<input type="hidden" name="social_channel" value="twitter" />
<input type="hidden" name="article_id" value="<%= article.id %>" />
<p> Twitter </p>
<textarea cols="37" rows="6" wrap="hard" name="tweet" maxlength="230" /><%= article.title %></textarea>
<textarea cols="37" rows="6" wrap="hard" name="tweet" maxlength="242" /><%= article.title %></textarea>
<% if article.last_buffered %>
<button class="btn btn-danger" style="font-size:1em;">🙈 TWEETED <%= time_ago_in_words(article.last_buffered) %> ago</button>
<% else %>