Skip to content

Commit

Permalink
Fixes statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric de Villamil committed Aug 10, 2013
1 parent 0b58519 commit ceef9fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/models/status.rb
Expand Up @@ -57,13 +57,13 @@ def send_to_twitter(user)
message = self.body.strip_html

length = calculate_real_length(message)
return length
if length > 113

message = "#{message[0..116]}... #{shortened_url}"

if length > 115
message = "#{message[0..115]}... #{shortened_url}"
else
message = "#{message} #{shortened_url}"
end
return

begin
tweet = twitter.update(message)
Expand Down

0 comments on commit ceef9fa

Please sign in to comment.