···
// not implemented for now because we support public first
const constellationResponse = await getConstellationBacklink({
70
+
// TODO: need special exception for did localhost
subject: `at://${OWNER_DID}/systems.gmstn.development.shard/${SERVICE_DID.slice(8)}`,
nsid: "systems.gmstn.development.channel",
···
channelRecordsParsed.forEach((channel) => {
147
+
console.log(channel);
if (mismatchOrIncorrect) return;
const { storeAt: storeAtRecord, routeThrough: routeThroughRecord } =
···
const routeThroughUri = routeThroughRecordParseResult.data;
186
+
console.log("requesting");
187
+
console.log(routeThroughUri.rKey, requestingLatticeDid.slice(8));
// FIXME: this also assumes that the requesting lattice's DID is a did:web
// see above for the rest of the issues.
186
-
if (routeThroughUri.rKey !== requestingLatticeDid.slice(8)) {
191
+
if (routeThroughUri.rKey === requestingLatticeDid.slice(8)) {
mismatchReason = `route through record domain did not match with requesting service. the requesting service's domain is ${requestingLatticeDid.slice(8)}, the domain on the record is ${routeThroughUri.rKey ?? ""}.`;
mismatchOrIncorrect = true;
···
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (mismatchOrIncorrect) {
console.log("Channels mismatched.");
196
-
console.log(mismatchReason)
201
+
console.log(mismatchReason);
return newErrorResponse(400, {
"Channels provided during the handshake had a mismatch between the channel values. Ensure that you are only submitting exactly the channels you have access to.",