Update comments for updated spec

main
Charles E. Lehner 3 years ago
parent 4ef0066ee8
commit 09b10e3845
Signed by: cel
GPG Key ID: C28D95BB012367EA

@ -190,10 +190,6 @@ Resolver.prototype.resolveOrResolveRepresentation = function (did, resolutionOpt
if (nextUpdate) didDocumentMetadata.nextUpdate = nextUpdate;
}
// 10
// TODO: update spec: updated should not be set for initial update (Create) operation
// const updated = didDocumentMetadata.updated = timestampToDateTime(msg.value.timestamp);
// if (updated) didDocumentMetadata.updated = updated;
// 11
pull(
self.sbot.query.read({
reverse: false,
@ -217,11 +213,11 @@ Resolver.prototype.resolveOrResolveRepresentation = function (did, resolutionOpt
}
function gotFirstMessage() {
if (!firstMsg) return cb({error: 'ssbMessageMissing'}, Null, {});
// 12
// 11
const created = didDocumentMetadata.created = timestampToDateTime(firstMsg.value.timestamp);
if (created) didDocumentMetadata.created = created;
// 12
if (firstMsg.key !== msg.key) {
// TODO: update spec
const updated = didDocumentMetadata.updated = timestampToDateTime(msg.value.timestamp);
if (updated) didDocumentMetadata.updated = updated;
}

Loading…
Cancel
Save