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
Currently when the library needs a clientId (when storing OutboundMessage instances as drafts for instance) it simply uses Date.now() as the client id. While this is fine for now, and probably enough for our needs at the moment, this is a problem for two reasons:
Date.now has millisecond precision. Trying to get two different client ids during the same millisecond would produce two identical ids.
The logic used to generate client ids should be configurable by clients of the library, thus I suggest that we implement a ClientIdProvider, and the library will provide a default implementation that we'll need to write as part of this issue too !
The provider would be given at Clientconstruction time, along with the Transport and PromiseProvider.
The text was updated successfully, but these errors were encountered:
Currently when the library needs a
clientId
(when storingOutboundMessage
instances as drafts for instance) it simply usesDate.now()
as the client id. While this is fine for now, and probably enough for our needs at the moment, this is a problem for two reasons:ClientIdProvider
, and the library will provide a default implementation that we'll need to write as part of this issue too !The provider would be given at
Client
construction time, along with theTransport
andPromiseProvider
.The text was updated successfully, but these errors were encountered: