diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2020-02-12 02:10:32 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2020-02-12 02:13:19 +0300 |
commit | 4139ae25496a06b188f19f6489ac017f3d96c6d8 (patch) | |
tree | 2bd5925e042d0ce9fbd6194781c11cb4de9d9981 /lib | |
parent | 6dbef95951424ed8d093739b35b2d887d33fa2b4 (diff) | |
parent | b0181fbbb9d551c330df8f29fc1768d9b619662c (diff) |
Merge branch 'next-minor' into develop
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diaspora/message_renderer.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/diaspora/message_renderer.rb b/lib/diaspora/message_renderer.rb index 883bcbaf6..f40886d97 100644 --- a/lib/diaspora/message_renderer.rb +++ b/lib/diaspora/message_renderer.rb @@ -35,11 +35,12 @@ module Diaspora def append_and_truncate if options[:truncate] - @message = message.truncate options[:truncate]-options[:append].to_s.size + # TODO: Remove .dup when upgrading to Rails 6.x. + @message = @message.truncate(options[:truncate] - options[:append].to_s.size).dup end - message << options[:append].to_s - message << options[:append_after_truncate].to_s + @message << options[:append].to_s + @message << options[:append_after_truncate].to_s end def escape |