Skip to content
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

Switch collection config from dict to list (fixes #11) #13

Merged
merged 7 commits into from
Jan 24, 2017

Conversation

leplatrem
Copy link
Contributor

@leplatrem leplatrem commented Jan 24, 2017

Fixes #11

  • Switch from dict to list
  • Send several messages on one action
  • Add test when resource_name or action are not specified
  • Add test with additional filter like record_id

@leplatrem leplatrem changed the title WIP Switch collection config from dict to list (fixes #11) Switch collection config from dict to list (fixes #11) Jan 24, 2017
@leplatrem leplatrem requested a review from Natim January 24, 2017 17:04
Copy link
Member

@Natim Natim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits otherwise it looks good to me.

============

* Rémy Hubscher <rhubscher@mozilla.com>
* Mathieu Leplatre <mathieu@mozilla.com>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add Alexis there :)

@@ -0,0 +1,13 @@
Copyright 2017 - Mozilla Foundation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it Mozilla Corporation there?

hooks = collection_record.get('kinto-emailer', {}).get('hooks', [])
messages = []
for hook in hooks:
conditions_met = all([field not in hook or field not in payload or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add a comment there.

@leplatrem leplatrem merged commit 8699d52 into master Jan 24, 2017
@leplatrem leplatrem deleted the 11-switch-to-list branch January 24, 2017 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants