1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

style(rubocop): Layout/*

هذا الالتزام موجود في:
Adam Cooke
2024-02-10 23:28:04 +00:00
الأصل 9ce28a427f
التزام 0e0aca06c9
4 ملفات معدلة مع 10 إضافات و5 حذوفات

عرض الملف

@@ -1,7 +1,9 @@
# frozen_string_literal: true # frozen_string_literal: true
class AddPrivacyModeToServers < ActiveRecord::Migration[6.1] class AddPrivacyModeToServers < ActiveRecord::Migration[6.1]
def change def change
add_column :servers, :privacy_mode, :boolean, default: false add_column :servers, :privacy_mode, :boolean, default: false
end end
end end

عرض الملف

@@ -34,12 +34,14 @@ module Postal
def normalized_headers def normalized_headers
[].tap do |new_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| 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| 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 list-owner|list-unsubscribe|list-subscribe|list-post
):}ix) }.each do |h| ):}ix)
}.each do |h|
new_headers << normalize_header(h) new_headers << normalize_header(h)
end end
end end

عرض الملف

@@ -71,8 +71,8 @@ module Postal
# #
def clean def clean
%w[clicks deliveries links live_stats loads messages %w[clicks deliveries links live_stats loads messages
raw_message_sizes spam_checks stats_daily stats_hourly raw_message_sizes spam_checks stats_daily stats_hourly
stats_monthly stats_yearly suppressions webhook_requests].each do |table| stats_monthly stats_yearly suppressions webhook_requests].each do |table|
@database.query("TRUNCATE `#{@database.database_name}`.`#{table}`") @database.query("TRUNCATE `#{@database.database_name}`.`#{table}`")
end end
end end

عرض الملف

@@ -92,7 +92,8 @@ module Postal
link_id: link["id"], link_id: link["id"],
ip_address: request.ip, ip_address: request.ip,
user_agent: request.user_agent, user_agent: request.user_agent,
timestamp: time }) timestamp: time
})
SendWebhookJob.queue(:main, SendWebhookJob.queue(:main,
server_id: message_db.server_id, server_id: message_db.server_id,
event: "MessageLinkClicked", event: "MessageLinkClicked",