-
Notifications
You must be signed in to change notification settings - Fork 549
feat(client-presence): Create Acknowledgment message interface and ackRequested
flow
#24470
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
Changes from all commits
649f757
f3d92c5
36e46f6
f679bc9
a5bcfa7
ad1793f
35757eb
e6c52b1
433df8b
bd69e1d
d50f7d3
b524bd8
3f55646
a820892
cb28f2a
acc759a
3815ef3
c7b1ed2
bb62127
354fc29
b88ed5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ interface DatastoreUpdateMessage { | |
content: { | ||
sendTimestamp: number; | ||
avgLatency: number; | ||
acknowledgementId?: AcknowledgmentIdType; | ||
isComplete?: true; | ||
data: DatastoreMessageContent; | ||
}; | ||
|
@@ -72,6 +73,25 @@ interface ClientJoinMessage { | |
}; | ||
} | ||
|
||
/** | ||
* Acknowledgement message type. | ||
*/ | ||
WillieHabi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
export const acknowledgementMessageType = "Pres:Ack"; | ||
|
||
interface AcknowledgementMessage { | ||
type: typeof acknowledgementMessageType; | ||
content: { | ||
id: AcknowledgmentIdType; | ||
}; | ||
} | ||
|
||
type AcknowledgmentIdType = string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nits:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oof right just saw this, will have a follow up fixing this |
||
|
||
/** | ||
* Outbound acknowledgement message. | ||
*/ | ||
export type OutboundAcknowledgementMessage = OutboundExtensionMessage<AcknowledgementMessage>; | ||
|
||
/** | ||
* Outbound client join message | ||
*/ | ||
|
@@ -82,7 +102,18 @@ export type OutboundClientJoinMessage = OutboundExtensionMessage<ClientJoinMessa | |
*/ | ||
export type InboundClientJoinMessage = VerifiedInboundExtensionMessage<ClientJoinMessage>; | ||
|
||
/** | ||
* Outbound presence message. | ||
*/ | ||
export type OutboundPresenceMessage = | ||
| OutboundAcknowledgementMessage | ||
| OutboundClientJoinMessage | ||
| OutboundDatastoreUpdateMessage; | ||
|
||
/** | ||
* Messages structures that can be sent and received as understood in the presence protocol | ||
*/ | ||
export type SignalMessages = ClientJoinMessage | DatastoreUpdateMessage; | ||
export type SignalMessages = | ||
| AcknowledgementMessage | ||
| ClientJoinMessage | ||
| DatastoreUpdateMessage; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.