Skip to content

Commit

Permalink
Fix logic in track opt-out
Browse files Browse the repository at this point in the history
  • Loading branch information
jmduke committed Jan 20, 2025
1 parent 3ccc762 commit 5d89cd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/postal/message_db/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def cancel_hold
def parse_content
parse_result = Postal::MessageParser.new(self)
if parse_result.actioned?
# Somethign was changed, update the raw message
# Something was changed, update the raw message
@database.update(raw_table, { data: parse_result.new_body }, where: { id: raw_body_id })
@database.update(raw_table, { data: parse_result.new_headers }, where: { id: raw_headers_id })
@raw = parse_result.new_body
Expand All @@ -577,11 +577,11 @@ def should_parse?
end

def track_clicks?
headers["x-track-clicks"] != ["no"]
raw_content.include?("x-track-clicks")
end

def track_loads?
headers["x-track-opens"] != ["no"]
raw_content.include?("x-track-loads")
end

private
Expand Down

0 comments on commit 5d89cd7

Please sign in to comment.