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

add Date and Message-ID to mail #573

Merged
merged 10 commits into from Nov 3, 2018

Conversation

Projects
None yet
3 participants
@my3
Copy link
Contributor

my3 commented Oct 13, 2018

Issue: #569

Mythri Pericharla and others added some commits Oct 13, 2018

Mythri Pericharla
Mythri Pericharla
Mythri Pericharla
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Oct 13, 2018

Codecov Report

Merging #573 into master will increase coverage by 0.64%.
The diff coverage is 54.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #573      +/-   ##
==========================================
+ Coverage   74.81%   75.44%   +0.64%     
==========================================
  Files         100      100              
  Lines        6426     6357      -69     
==========================================
- Hits         4807     4796      -11     
+ Misses       1272     1215      -57     
+ Partials      347      346       -1
Impacted Files Coverage Δ
app/pkg/email/smtp/smtp.go 18.46% <54.55%> (+2.43%) ⬆️
app/middlewares/tenant.go 82.69% <0%> (-0.94%) ⬇️
app/middlewares/user.go 86.54% <0%> (-0.73%) ⬇️
app/storage/postgres/post.go 82.95% <0%> (-0.46%) ⬇️
app/cmd/routes.go 86.96% <0%> (-0.22%) ⬇️
app/pkg/web/renderer.go 82.61% <0%> (-0.19%) ⬇️
app/middlewares/auth.go 100% <0%> (ø) ⬆️
app/models/identity.go 93.75% <0%> (ø) ⬆️
app/models/feedback.go 92.86% <0%> (ø) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbf0f39...c13aea6. Read the comment docs.

@goenning
Copy link
Member

goenning left a comment

Thanks for your PR! Please have a look on those 2 comments and let me know what you think about it.

timestamp := strconv.FormatInt(time.Now().UTC().UnixNano(), 10)
unq := uuid.New()
randStr := unq.String()
host, err := os.Hostname()

This comment has been minimized.

@goenning

goenning Oct 14, 2018

Member

We shouldn't use os.Hostname here, the hostname is usually completely different than the real domain name. There's a localname variable that we could use instead.


func generateMessageID() (string, error) {
timestamp := strconv.FormatInt(time.Now().UTC().UnixNano(), 10)
unq := uuid.New()

This comment has been minimized.

@goenning

goenning Oct 14, 2018

Member

I'd prefer to use rand.String(32) that is already available on Fider. This random string + timestamp is unique enough for this operation. By doing so, we won't need the external uuid package.

Mythri Pericharla added some commits Oct 17, 2018

Mythri Pericharla
Mythri Pericharla
@goenning
Copy link
Member

goenning left a comment

Alright, that looks great. I left 3 comments (one using new GitHub suggestions feature 😄). After that cleanup on Gopkg we can merge this.

Thank you!

Show resolved Hide resolved app/pkg/email/smtp/smtp.go Outdated
Show resolved Hide resolved Gopkg.lock Outdated
Show resolved Hide resolved Gopkg.toml Outdated

goenning and others added some commits Oct 18, 2018

Mythri Pericharla

@goenning goenning merged commit a52fab3 into getfider:master Nov 3, 2018

5 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: push Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test-server Your tests passed on CircleCI!
Details
ci/circleci: test-ui Your tests passed on CircleCI!
Details
@goenning

This comment has been minimized.

Copy link
Member

goenning commented Nov 3, 2018

Thank you so much for this! 🎉

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