Skip to content

Commit

Permalink
♻️ Simplify CHARSET args in search_internal
Browse files Browse the repository at this point in the history
  • Loading branch information
nevans committed Nov 7, 2024
1 parent 86e9668 commit d723c6d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/net/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2941,12 +2941,9 @@ def enforce_logindisabled?

def search_internal(cmd, keys, charset)
keys = normalize_searching_criteria(keys)
args = charset ? ["CHARSET", charset, *keys] : keys
synchronize do
if charset
send_command(cmd, "CHARSET", charset, *keys)
else
send_command(cmd, *keys)
end
send_command(cmd, *args)
clear_responses("SEARCH").last || []
end
end
Expand Down

0 comments on commit d723c6d

Please sign in to comment.