a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

prefix lex resolution txt record w/ did=

+3 -2
+3 -2
lexicons/publish.ts
··· 57 57 password: LEAFLET_APP_PASSWORD, 58 58 }); 59 59 const uniqueIds = Array.from(new Set(lexiconsData.map((lex) => lex.id))); 60 + let txtRecordValue = `did=${agent.assertDid}`; 60 61 for (let id of uniqueIds) { 61 62 let host = id.split(".").slice(0, -1).reverse().join("."); 62 63 host = `_lexicon.${host}`; 63 64 let txtRecords = await getTXTRecords(host); 64 - if (!txtRecords.find((r) => r.join("") === agent.assertDid)) { 65 + if (!txtRecords.find((r) => r.join("") === txtRecordValue)) { 65 66 let name = host.split(".").slice(0, -2).join(".") || ""; 66 67 console.log("creating txt record", name); 67 68 let res = await fetch( ··· 75 76 body: JSON.stringify({ 76 77 name: name, 77 78 type: "TXT", 78 - value: agent.assertDid, 79 + value: txtRecordValue, 79 80 ttl: 60, 80 81 }), 81 82 },