thorn icon indicating copy to clipboard operation
thorn copied to clipboard

Filtering Subscriptions - Sender Field

Open EdCampion opened this issue 7 years ago • 0 comments

Hi, I've looked at issue https://github.com/robinhood/thorn/issues/7 and I'm not sure if it solves my issue, or if my case is more complex.

Given entities Transport Order, Company, User and Application.

A Transport Order is created by and "belongs to" a Producer Company. It is consumed by Consumer Companies. It maintains a m2m "consumers" relationship with companies. Users are employees of the companies Consumer companies only wish to be notified about updates/ deletes to Transport Orders they consume. Applications are OAuth apps created by developers, to act on behalf of Users.

Ideal Flow

  1. Application on behalf of an employee of a consumer company registers a subscription to transport_order.change.

  2. Producer company edits an order consumed by the consumer company

  3. Consumer company's webhook is hit by the change, and not with changes to orders it does not subscribe to.

I don't think the sender_field is advanced enough to handle this, but hopefully I'm wrong?

EdCampion avatar Feb 17 '17 16:02 EdCampion