id in identity.js is an timestamp
Opened this issue · 2 comments
d-koppenhagen commented
- Why is this variable called
id
? isn't it atimestamp
?- or should it be an Id (maybe than it would be better to use the
guid()
-function)?
- or should it be an Id (maybe than it would be better to use the
jhamfler commented
.getTime()
returns the time in milliseconds since epoch. If two identities are created in one millisecond both would have the same id.
sdruesedow commented
yes, that could be an issue. In this case the guid() function would be a better choice.
Anyway, I'm not sure at the moment, that the id field is used somewhere for something meaninfull. IMO the assigned rtcIdentity should make an Identity unique and therefore plays the role of an id already.