OverviewFilesCommitsIssuesDocsReleasesPeers

apds commits / 5b22839

try/catch on log sort to weed out malformed documents
5b22839ba52f7a09b6284abf1527941ca7639dd6
by Everett Bogue <ev@evbogue.com> · 2025-06-16T21:04:42.000Z

Changed files (1) +11 -9

bogbot.js +11 -9
……@@ -37,15 +37,17 @@ bogbot.start = async (appId) => {
3737 const newArray = []
3838
3939 await Promise.all(hashLog.map(async (hash) => {
40 const obj = {
41 hash,
42 sig: await bogbot.get(hash)
43 }
44 obj.author = obj.sig.substring(0, 44)
45 obj.opened = await bogbot.open(obj.sig)
46 obj.text = await bogbot.get(obj.opened.substring(13))
47 obj.ts = obj.opened.substring(0, 13)
48 newArray.push(obj)
40 try {
41 const obj = {
42 hash,
43 sig: await bogbot.get(hash)
44 }
45 obj.author = obj.sig.substring(0, 44)
46 obj.opened = await bogbot.open(obj.sig)
47 obj.text = await bogbot.get(obj.opened.substring(13))
48 obj.ts = obj.opened.substring(0, 13)
49 newArray.push(obj)
50 } catch (err) { console.log(err) }
4951 }))
5052 const newLog = []
5153