You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The webhook extension will first load the document from the primary storage and only import it if it doesn't already exist in there.
I don't see the behavior in the code or in my testing. From my understanding, the primary storage is handled by another extension such as as RocksDB, SQLite, or the generic Database extension. I don't see where the Webhook extension loads another document from storage in its onLoadDocument hook.
Also placing another extension (such as the Database extension) before the Webhook extension does not appear to prevent the Webhook onCreate from triggering when the document exists in the database. We could reject the promise in the database extension onLoadDocument but then it can't return the ydoc.
Is this webhook documentation incorrect? What is the correct way to prevent the webhook onCreate hook from firing if the document has already been loaded from another exteions (primary storage)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The documention for the Webhook onCreate hook states:
I don't see the behavior in the code or in my testing. From my understanding, the primary storage is handled by another extension such as as RocksDB, SQLite, or the generic Database extension. I don't see where the Webhook extension loads another document from storage in its
onLoadDocument
hook.Also placing another extension (such as the Database extension) before the Webhook extension does not appear to prevent the Webhook
onCreate
from triggering when the document exists in the database. We could reject the promise in the database extensiononLoadDocument
but then it can't return the ydoc.Is this webhook documentation incorrect? What is the correct way to prevent the webhook
onCreate
hook from firing if the document has already been loaded from another exteions (primary storage)?Beta Was this translation helpful? Give feedback.
All reactions