-
Notifications
You must be signed in to change notification settings - Fork 513
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
API & Webhooks Module: missing some events? #4141
Comments
|
Yes, feel free to submit PRs. |
"convo.deleted_forever" and "convo.restored" events have been added in API & Webhooks Module v1.0.80. There was no need in extra hooks. |
Thank you but I would argue the event you are using for "convo.deleted_forever" could cause problem: the event "conversation.deleting" is called before the conversation is deleted. So if something goes wrong after that call and the conversation ends-up not being deleted in Freescout, third-party apps will potentially already have deleted their data on their end and will be left out of sync. Is there any way to have an event fire after the conversation has successfully been deleted? |
Normally conversations are deleted forever via https://github.com/freescout-help-desk/freescout/blob/dist/app/Conversation.php#L1889 Conversation observer's |
Right, ok I see: because you use mass deletion on conversations on https://github.com/freescout-help-desk/freescout/blob/dist/app/Conversation.php#L1916 Ok, but my point still remains the same: a third-party can only be told that Freescout intends to delete one or more conversations. (through the "conversation.deleting" or "conversations.before_delete_forever" events) There's no way to know that those conversations actually have bene deleted for real and so if something goes wrong after you issued your webhook, you may end up not deleting your copy of one or more conversations and the third-party will have already deleted their copy... At the very least, could we add a "conversations.after_delete_forever" after It's not perfect, but at least there's less risk of getting de-synchronized...? |
Unfortunately not. |
Of course - but like your conversations.before_delete_forever event, you could pass the conversation IDs... |
After a conversation is deleted from DB it can't be retrieved from DB by ID to pass it's data to the webhook. |
:) But you already have the ids - you have them in the $conversation_ids variable... |
Hi all!
I'm trying to connect a FreeScout installation to a custom remote application via the API. It seems there may be some events that are not sent out by the API, and I was wondering if there's a reason for the omissions or if they are just things to be added, in which case I offer to submit a PR:
Thanks!
The text was updated successfully, but these errors were encountered: