Skip to content

fix(email): recognize common forwarded-subject prefixes #5704

Description

@Whxuan0701

Summary

Forwarded messages whose subjects use common FW: or differently-cased Fwd: prefixes are processed as replies instead of forwards when Macro computes body_replyless.

Current implementation

Both crates/email_utils/src/body_replyless/html_parser.rs and plaintext_parser.rs bypass quoted-content removal only when the subject starts with the exact case-sensitive string Fwd:. Providers and clients also emit forms such as FW:, fw:, and fwd:.

When those forms are not recognized, the normal reply splitter can remove the forwarded message content from the parsed and search representations.

Expected result

  • Fwd: and FW: are recognized case-insensitively.
  • Leading subject whitespace does not prevent recognition.
  • Words that merely begin with fw or fwd are not treated as forward prefixes.
  • HTML and plaintext extraction behave consistently.

Suggested direction

Use one small subject-prefix predicate from both extraction paths and cover it through the public body-replyless behavior.

Non-goals

  • Adding localized forward prefixes.
  • Changing how new forward subjects are generated in the web composer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions