|
|
@ -190,10 +190,6 @@ Resolver.prototype.resolveOrResolveRepresentation = function (did, resolutionOpt
|
|
|
|
if (nextUpdate) didDocumentMetadata.nextUpdate = nextUpdate;
|
|
|
|
if (nextUpdate) didDocumentMetadata.nextUpdate = nextUpdate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 10
|
|
|
|
// 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(
|
|
|
|
pull(
|
|
|
|
self.sbot.query.read({
|
|
|
|
self.sbot.query.read({
|
|
|
|
reverse: false,
|
|
|
|
reverse: false,
|
|
|
@ -217,11 +213,11 @@ Resolver.prototype.resolveOrResolveRepresentation = function (did, resolutionOpt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function gotFirstMessage() {
|
|
|
|
function gotFirstMessage() {
|
|
|
|
if (!firstMsg) return cb({error: 'ssbMessageMissing'}, Null, {});
|
|
|
|
if (!firstMsg) return cb({error: 'ssbMessageMissing'}, Null, {});
|
|
|
|
// 12
|
|
|
|
// 11
|
|
|
|
const created = didDocumentMetadata.created = timestampToDateTime(firstMsg.value.timestamp);
|
|
|
|
const created = didDocumentMetadata.created = timestampToDateTime(firstMsg.value.timestamp);
|
|
|
|
if (created) didDocumentMetadata.created = created;
|
|
|
|
if (created) didDocumentMetadata.created = created;
|
|
|
|
|
|
|
|
// 12
|
|
|
|
if (firstMsg.key !== msg.key) {
|
|
|
|
if (firstMsg.key !== msg.key) {
|
|
|
|
// TODO: update spec
|
|
|
|
|
|
|
|
const updated = didDocumentMetadata.updated = timestampToDateTime(msg.value.timestamp);
|
|
|
|
const updated = didDocumentMetadata.updated = timestampToDateTime(msg.value.timestamp);
|
|
|
|
if (updated) didDocumentMetadata.updated = updated;
|
|
|
|
if (updated) didDocumentMetadata.updated = updated;
|
|
|
|
}
|
|
|
|
}
|
|
|
|