Uh oh!
There was an error while loading. Please reload this page.
Add NewNote.deferUntilThread - #361
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
NewNote.deferUntilThread.A note addressed by
{ source }resolves immediately in the normal case, andsaveNotereturnsnullwhen no thread carries that source — which for aconnector usually means the item the note belongs to has not synced yet,
often because a different product syncs it and lags. Today that leaves each
connector to build its own hold-and-retry store.
With this flag set, the platform holds the note and attaches it as soon as a
thread with that source appears.
When not to set it
Leave it unset when a miss means the note is genuinely undeliverable —
nullis then the signal you want, and holding the note would accumulate payloads
for a thread that will never arrive. The JSDoc spells this out, along with two
properties worth knowing before you rely on it:
set
created(as connectors already should) rather than relying on arrivalorder.
{ source }: a second unkeyednote to the same unresolved source replaces the first. Give each a distinct
keyif you may defer more than one.Scope
Type and documentation only — no runtime behaviour ships with this. It is
deliberately separated from the connector change that uses it so the platform
side can land and deploy first.