Skip to content

Commit

Permalink
Remove special case that breaks 'Reply-To' (#13)
Browse files Browse the repository at this point in the history
* remove special case that breaks 'Reply-To'

Currently if one does `msg.setHeader('Reply-To', 'value')` that will save the value to the existing instance of `Reply-To` in the headers' `this.store`, and then at dump time the value will be called with `.dump()`, which breaks because `'value'` will be a string and won't have a `.dump()` method.

If we just remove this special case then the `Reply-To` header will be added normally.

* Keep 'Reply-To' but use `v` directly

This reverts commit a766a4e and replaces `v.dump()` with just `v` when dumping the `Reply-To` header, because `v` will be a string.

Co-authored-by: fiatjaf <faitjaf@gmail.com>
  • Loading branch information
fiatjaf and fiatjaf authored Feb 20, 2022
1 parent ae4dc76 commit 792b294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MIMEMessageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class MIMEMessageHeader {
placement: 'header',
name: 'Reply-To',
dump: (v) => {
return v.dump()
return v
}
},
{
Expand Down

0 comments on commit 792b294

Please sign in to comment.