anproto personal data server
2
fork

Configure Feed

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

try/catch on log sort to weed out malformed documents

+11 -9
+11 -9
bogbot.js
··· 37 37 const newArray = [] 38 38 39 39 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) } 49 51 })) 50 52 const newLog = [] 51 53