anproto personal data server
2
fork

Configure Feed

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

move try catch into bog5 open

+8 -4
+8 -4
bogbot.js
··· 61 61 } 62 62 63 63 bogbot.open = async (msg) => { 64 - const pubkey = msg.substring(0, 44) 65 - const sig = msg.substring(44) 64 + try { 65 + const pubkey = msg.substring(0, 44) 66 + const sig = msg.substring(44) 66 67 67 - const opened = new TextDecoder().decode(nacl.sign.open(decode(sig), decode(pubkey))) 68 + const opened = new TextDecoder().decode(nacl.sign.open(decode(sig), decode(pubkey))) 68 69 69 - return opened 70 + return opened 71 + } catch (err) { 72 + console.log('Not a valid Bog5 protocol message') 73 + } 70 74 } 71 75 72 76 import { yaml } from './lib/yaml.js'