-
Notifications
You must be signed in to change notification settings - Fork 57
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
instance-based events #7
Comments
just found about |
Yeah, the sender_field should work here when you are mapping to a user, possible that it even works for objects that are not users also. In my first webhook library written a long time ago, the subscribers could match arbitrary fields on the model: https://github.com/ask/durian Maybe the event name could have formats so that (if AddressBook here had a name, and a user can have multiple address books (Work, Friends): @webhook_model( on_create=ModelEvent('contact.created.{.address_book.name}'), sender_field="address_book.user", ) Then you could subscribe to |
It would be useful if subscribers could receive events only related to a specific instance.
Scenario:
A web application lets users create their own
AddressBook
. EachAddressBook
have manyContact
s:There doesn't seem to be a way for a subscriber to receive
contact.created
events only forContact
s of a specificAddressBook
.The text was updated successfully, but these errors were encountered: