Skip to content

Commit

Permalink
style(rubocop): Layout/*
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Feb 12, 2024
1 parent 9ce28a4 commit 0e0aca0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions db/migrate/20240206173036_add_privacy_mode_to_servers.rb
@@ -1,7 +1,9 @@
# frozen_string_literal: true

class AddPrivacyModeToServers < ActiveRecord::Migration[6.1]

def change
add_column :servers, :privacy_mode, :boolean, default: false
end

end
6 changes: 4 additions & 2 deletions lib/postal/dkim_header.rb
Expand Up @@ -34,12 +34,14 @@ def header_names

def normalized_headers
[].tap do |new_headers|
headers.select { |h| h.match(%r{
headers.select { |h|
h.match(%r{
^(
from|sender|reply-to|subject|date|message-id|to|cc|mime-version|content-type|content-transfer-encoding|
resent-to|resent-cc|resent-from|resent-sender|resent-message-id|in-reply-to|references|list-id|list-help|
list-owner|list-unsubscribe|list-subscribe|list-post
):}ix) }.each do |h|
):}ix)
}.each do |h|
new_headers << normalize_header(h)
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/postal/message_db/provisioner.rb
Expand Up @@ -71,8 +71,8 @@ def drop_table(table_name)
#
def clean
%w[clicks deliveries links live_stats loads messages
raw_message_sizes spam_checks stats_daily stats_hourly
stats_monthly stats_yearly suppressions webhook_requests].each do |table|
raw_message_sizes spam_checks stats_daily stats_hourly
stats_monthly stats_yearly suppressions webhook_requests].each do |table|
@database.query("TRUNCATE `#{@database.database_name}`.`#{table}`")
end
end
Expand Down
3 changes: 2 additions & 1 deletion lib/postal/tracking_middleware.rb
Expand Up @@ -92,7 +92,8 @@ def dispatch_redirect_request(request, server_token, link_token)
link_id: link["id"],
ip_address: request.ip,
user_agent: request.user_agent,
timestamp: time })
timestamp: time
})
SendWebhookJob.queue(:main,
server_id: message_db.server_id,
event: "MessageLinkClicked",
Expand Down

0 comments on commit 0e0aca0

Please sign in to comment.