This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 578
adds a couple of new constructors for Message, including New(*buffalo.App). this fixes #1296 #1338
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## development #1338 +/- ##
===============================================
+ Coverage 48.38% 48.76% +0.37%
===============================================
Files 91 92 +1
Lines 4005 4040 +35
===============================================
+ Hits 1938 1970 +32
- Misses 1964 1966 +2
- Partials 103 104 +1
Continue to review full report at Codecov.
|
It looks nice. Quick question about the mutex, if I'm right, it here in case we have a process sending multiple emails, and we don't want to mix the data field between them, right ? Shouldn't we move this package to a plugin ? |
I get paranoid around working with maps since they’re not thread safe, hence the mutex. I don’t see a lot of times that that code would be run concurrently, but if it is, it won’t break. :)
And yes, mail probably should be a plug-in, but one thing at a time. :)
Thanks.
…-----------
Mark Bates
On Oct 1, 2018, 1:04 AM -0400, kteb ***@***.***>, wrote:
It looks nice. Quick question about the mutex, if I'm right, it here in case we have a process sending multiple emails, and we don't want to mix the data field between them, right ?
Shouldn't we move this package to a plugin ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
kteb
approved these changes
Oct 1, 2018
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 thanks for help.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@kteb I know you took a swing at this too. There were a things about your approach that didn't feel "right" to me.
My approach adds two new attributes to
Message
:Context Context
andData render.Data
. When calls to functions likeMessage#AddBody
theMessage.Data
and the passed indata
will be merged together.I've also add a
New(c buffalo.Context) Message
. We should recommend people use this function when sending emails from an action. This will add the context's data to theMessage.Data
. This brings along the route paths.I'm up for discussion on this if people don't like it.