DEV: Use Rails query builder (#14759)

DEV: Use Rails query builder (#14759)

diff --git a/lib/imap/sync.rb b/lib/imap/sync.rb
index 5f03427..040910c 100644
--- a/lib/imap/sync.rb
+++ b/lib/imap/sync.rb
@@ -141,7 +141,7 @@ module Imap
             message_id: Email.message_id_clean(email['ENVELOPE'].message_id),
             imap_uid: nil,
             imap_uid_validity: nil
-          ).where("to_addresses LIKE '%#{@group.email_username}%'").first
+          ).where("to_addresses LIKE ?", "%#{@group.email_username}%").first
 
           if incoming_email
             incoming_email.update(

GitHub sha: 00b99c6613516f73c0c0826ab4b937b818e030ce

This commit appears in #14759 which was approved by CvX and ZogStriP. It was merged by udan11.