-
Notifications
You must be signed in to change notification settings - Fork 18
Update design to allow custom attributes in call to Notification service #51
Conversation
main.go
Outdated
@@ -78,6 +78,7 @@ func main() { | |||
resolvers.Register("workitem.update", collector.ConfiguredVars(config, collector.NewWorkItemResolver(witClient))) | |||
resolvers.Register("comment.create", collector.ConfiguredVars(config, collector.NewCommentResolver(witClient))) | |||
resolvers.Register("comment.update", collector.ConfiguredVars(config, collector.NewCommentResolver(witClient))) | |||
resolvers.Register("user.email.update", collector.ConfiguredVars(config, collector.NewUserResolver(witClient))) |
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.
Missing template ?
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.
added a fork of workitem.update template where I stripped out almost everything. Will make it look pretty 8f42085
@@ -80,6 +81,13 @@ func (a *AsyncWorkerNotifier) do(cn contextualNotification) { | |||
|
|||
return | |||
} | |||
|
|||
if vars == nil { |
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't assume vars is null 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.
right, my bad..
template/user.email.update/body.html
Outdated
max-width: 700px; | ||
text-align: left;"> | ||
<h3 style="margin-bottom: 5px;"> | ||
<a href="{{.custom.VerifyURL }}" style=" |
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.
Normal would be a camelcase style variable..
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.
@@ -0,0 +1,2 @@ | |||
In-Reply-To: <workitems/{{.workitem.Data.ID}}@notify.openshift.io> |
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.
No workitem in the auth context. None of these headers make any sense.. ?
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.
removed it :)
@aslakknutsen , thank you for the review - I've addressed the comments. |
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.
A test case to cover just custom vars?
Thanks @aslakknutsen added some more tests |
Added a validator of the optional |
Added support for passing a
custom
parameter to thenotify
API.This would be used to pass the verifyCode for an updated email.
Part of fabric8-services/fabric8-auth#62