diff --git a/app/models/webhook.rb b/app/models/webhook.rb index 1afefa6..d8e7b43 100644 --- a/app/models/webhook.rb +++ b/app/models/webhook.rb @@ -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:)