lib: replace URI.encode by CGI.escape
URI.encode was removed in Ruby 3. Fix an error when adding a phone number to a Helpscout ticket.
This commit is contained in:
parent
799ca8e499
commit
c75dba701d
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ class Helpscout::API
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_phone_number(email, phone)
|
def add_phone_number(email, phone)
|
||||||
query = URI.encode("(email:#{email})")
|
query = CGI.escape("(email:#{email})")
|
||||||
response = call_api(:get, "#{CUSTOMERS}?mailbox=#{user_support_mailbox_id}&query=#{query}")
|
response = call_api(:get, "#{CUSTOMERS}?mailbox=#{user_support_mailbox_id}&query=#{query}")
|
||||||
if response.success?
|
if response.success?
|
||||||
body = parse_response_body(response)
|
body = parse_response_body(response)
|
||||||
|
|
Loading…
Reference in a new issue