-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide cc support #38
base: master
Are you sure you want to change the base?
Conversation
08528a9
to
2772fef
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, assuming you are able to test and resolve the question in the first file.
@LaithSaq Can you please fix your line ending settings and rebase, so there are no unnecessary line ending changes in the changeset? |
That's me actually "fixing" the line endings. I set my git client to checkout Windows style (CRLF) and commit Unix style (LF). The unnecessary changes you're noticing are caused by the fact that files didn't have consistent line endings to being with. Do you suggest I re-use CRLF in files that originally used that? UPDATE: UPDATE: |
Line endings were not changed within this formatting to avoid making the change log huge for reviewing purposes.
89bc8f7
to
57bfae0
Compare
tags: f.Lorem.Words().ToList() | ||
)); | ||
|
||
private static List<(string name, string address)> GenerateRandomCcList(Faker f) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private methods should be lower case
)); | ||
|
||
private static List<(string name, string address)> GenerateRandomCcList(Faker f) { | ||
var count = f.Random.Int(0, 4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you should have randomness like this in tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to have variable instance lengths to account for different cases. But maybe that's a bit over engineering. Do you think 3 is a good count here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make these cases explicit instead?
@@ -52,6 +54,7 @@ public EmailMessage(Guid id, (string name, string address) from, (string name, s | |||
Id = id; | |||
From = from; | |||
To = to; | |||
Cc = cc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not have CC
be nullable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the immutability story in this class is not great, but no need to fix it now in this MR.
src/MiddleMail/MiddleMail.csproj
Outdated
@@ -4,7 +4,7 @@ | |||
<TargetFramework>net6</TargetFramework> | |||
<WarningAsErrors>true</WarningAsErrors> | |||
<PackageId>MiddleMail</PackageId> | |||
<Version>0.4.0</Version> | |||
<Version>0.5.0</Version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I beleive you need to bump a few more versions than only this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that makes sense, I guess I didn't think about that thoroughly, my bad
7dac281
to
d68d833
Compare
Related issue #37
This pull request expands on the EmailMessage API to support CCs. This is done by levereging the CCs property provided by MimeMessage.
We also updated the elastic search document to support logging the new CC property.