Ensure mutable string is used to prevent warning

This commit is contained in:
David Heinemeier Hansson
2025-11-29 08:58:48 -08:00
parent d323c3cfc0
commit 20ba1cf2ae

View File

@@ -53,7 +53,7 @@ class Webhook < ApplicationRecord
end
def extract_text_from(response)
response.body.dup.force_encoding("UTF-8") if response.code == "200" && response.content_type.in?(%w[ text/html text/plain ])
String.new(response.body).force_encoding("UTF-8") if response.code == "200" && response.content_type.in?(%w[ text/html text/plain ])
end
def receive_text_reply_to(room, text:)