Expose message ID list from `ReferencesHeader`
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Feature or enhancement
Proposal:
When sending, parsing or validating mails which are replies to other mails it is necessary to access the message IDs from the In-Reply-To and References headers. These, however, are currently not exposed.
# Example use case
if "In-Reply-To" in msg and "References" in msg:
[in_reply_to_token] = msg["In-Reply-To"].message_ids
[*_, most_recent_reference_token] = msg["References"].message_ids
if in_reply_to_token.value != most_recent_reference_token.value:
raise ValueError(f"Error: References list end must match In-Reply-To message ID")
A workaround is to access the private _parse_tree property which does expose the message_id, though like any private property that should obviously be avoided. This is comparable to AddressHeader which already exposes addresses.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách đọc ReferencesHeader và API AddressHeader hiện có, sau đó kiểm tra cách ReferencesHeader hiện đang cung cấp dữ liệu _parse_tree riêng tư của nó. Cung cấp các ID thư thông qua giao diện header công khai để cách sử dụng In-Reply-To và References được minh họa hoạt động mà không cần truy cập riêng tư, đồng thời xác minh rằng các giá trị được cung cấp vẫn giữ nguyên thông tin ID thư hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- backend
- Loại issue
- Tính năng
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 70/100