1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-03-03 14:24:06 +00:00

Compare commits

8 الالتزامات
2.3.0 ... 2.3.2

المؤلف SHA1 الرسالة التاريخ
Adam Cooke
66d26c8d4f Merge pull request #2834 from postalserver/release-please--branches--main
chore(main): release 2.3.2
2024-03-01 14:44:42 +00:00
github-actions[bot]
343292bbde chore(main): release 2.3.2 2024-03-01 13:15:31 +00:00
Adam Cooke
694240ddcd fix: truncate output and details in deliveries to 250 characters
closes #2831
2024-03-01 13:14:48 +00:00
github-actions[bot]
18ba7140b4 chore(main): release 2.3.1 (#2812)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-23 22:25:22 +00:00
Adam Cooke
2834e2c379 fix: update raw headers after changing messages to during parsing
Previously, headers were not updated but the mail gem parsing may decide
to change the transfer encoding. If it does this, the body is updated to
the new format but the header is not, this results in a mismatch when the
message it sent onwards and the client being unable render the message.

The specific situation identified was changing an HTML-only e-mail from
quoted-printable to 7bit.

closes #2816
2024-02-23 22:16:36 +00:00
Adam Cooke
559b08ddd3 chore(github-actions): allow stale action to be run on demand 2024-02-22 00:30:49 +00:00
Adam Cooke
57b72fb4b7 chore(github-actions): add 'docs' label to exclude from staleness checks 2024-02-22 00:28:03 +00:00
Adam Cooke
d90a456dfa chore(github-actions): add action to close stale issues and PRs 2024-02-22 00:27:15 +00:00
7 ملفات معدلة مع 68 إضافات و4 حذوفات

عرض الملف

@@ -2,7 +2,7 @@
name: 🐛 Bug report
about: Create a report to help us improve Postal and fix issues.
title: ''
labels: bug
labels: ''
assignees: ''
---

30
.github/workflows/close.yml مباع Normal file
عرض الملف

@@ -0,0 +1,30 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
stale-issue-label: stale
stale-pr-label: stale
days-before-issue-stale: 30
days-before-pr-stale: 45
days-before-issue-close: 5
days-before-pr-close: 10
exempt-all-assignees: true
exempt-all-milestones: true
exempt-issue-labels: bug,enhancement,docs,install,feature

عرض الملف

@@ -1,3 +1,3 @@
{
".": "2.3.0"
".": "2.3.2"
}

عرض الملف

@@ -2,6 +2,27 @@
This file contains all the latest changes and updates to Postal.
## [2.3.2](https://github.com/postalserver/postal/compare/2.3.1...2.3.2) (2024-03-01)
### Bug Fixes
* truncate output and details in deliveries to 250 characters ([694240d](https://github.com/postalserver/postal/commit/694240ddcdef1df9b32888de8fb743d2dee86462)), closes [#2831](https://github.com/postalserver/postal/issues/2831)
## [2.3.1](https://github.com/postalserver/postal/compare/2.3.0...2.3.1) (2024-02-23)
### Bug Fixes
* update raw headers after changing messages to during parsing ([2834e2c](https://github.com/postalserver/postal/commit/2834e2c37971db9b0b0498e38b382cf1f8ee26eb)), closes [#2816](https://github.com/postalserver/postal/issues/2816)
### Miscellaneous Chores
* **github-actions:** add 'docs' label to exclude from staleness checks ([57b72fb](https://github.com/postalserver/postal/commit/57b72fb4b7f7fc934cfa23906de65b8f6d6d1978))
* **github-actions:** add action to close stale issues and PRs ([d90a456](https://github.com/postalserver/postal/commit/d90a456dfa661d87e820160d2045c73c765564d2))
* **github-actions:** allow stale action to be run on demand ([559b08d](https://github.com/postalserver/postal/commit/559b08ddd31ecd904fd09c1e2822161b853166b9))
## [2.3.0](https://github.com/postalserver/postal/compare/2.2.2...2.3.0) (2024-02-13)

عرض الملف

@@ -7,7 +7,14 @@ module Postal
def self.create(message, attributes = {})
attributes = message.database.stringify_keys(attributes)
attributes = attributes.merge("message_id" => message.id, "timestamp" => Time.now.to_f)
# Ensure that output and details don't overflow their columns. We don't need
# these values to store more than 250 characters.
attributes["output"] = attributes["output"][0, 250] if attributes["output"]
attributes["details"] = attributes["details"][0, 250] if attributes["details"]
id = message.database.insert("deliveries", attributes)
delivery = Delivery.new(message, attributes.merge("id" => id))
delivery.update_statistics
delivery.send_webhooks

عرض الملف

@@ -535,7 +535,9 @@ module Postal
if parse_result.actioned?
#  Somethign 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
@raw_headers = parse_result.new_headers
@raw_message = nil
end
update("parsed" => 1, "tracked_links" => parse_result.tracked_links, "tracked_images" => parse_result.tracked_images)

عرض الملف

@@ -14,7 +14,7 @@ module Postal
return unless @domain
@parsed_output = generate
@parsed_output = generate.split("\r\n\r\n", 2)
end
attr_reader :tracked_links
@@ -25,7 +25,11 @@ module Postal
end
def new_body
@parsed_output.split("\r\n\r\n", 2)[1]
@parsed_output[1]
end
def new_headers
@parsed_output[0]
end
private