docs icon indicating copy to clipboard operation
docs copied to clipboard

doc: Document data model Integration::Hooks

Open sojan-official opened this issue 3 years ago • 0 comments

there are two types of hooks .. account hooks -> inbox id should be nil .. works across the account (for example webhooks, slack etc ) inbox hooks -> inbox id is present, work in inbox scope, multiple ones can be present ( example Dialogflow )

https://github.com/chatwoot/chatwoot/blob/baf697f064bfdd8c691d1c2ee84fff8f8130a699/app/listeners/hook_listener.rb#L22

the particular line of code is to skip the case where we are checking for an inbox hook, but the message event that was triggered doesn't belong to that inbox. in the case of Dialogflow, the inbox id should be empty for the hook. hence that line of code shouldn't come into effect since hook.inbox = nil

sojan-official avatar Mar 30 '22 13:03 sojan-official