| … | … | @@ -36,7 +36,7 @@ bogbot.start = async (appId) => { |
| 36 | 36 | await Promise.all(log.map(async (hash) => { |
| 37 | 37 | const obj = { |
| 38 | 38 | hash, |
| 39 | sig: await bogbot.find(hash) | |
| 39 | sig: await bogbot.get(hash) | |
| 40 | 40 | } |
| 41 | 41 | obj.opened = await bogbot.open(obj.sig) |
| 42 | 42 | obj.ts = obj.opened.substring(0, 13) |
| … | … | @@ -161,7 +161,7 @@ bogbot.make = async (data) => { |
| 161 | 161 | return hash |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | bogbot.find = async (hash) => { | |
| 164 | bogbot.get = async (hash) => { | |
| 165 | 165 | const blob = await db.get(hash) |
| 166 | 166 | |
| 167 | 167 | return blob |
| … | … | @@ -6,9 +6,9 @@ export const profile = async () => { |
| 6 | 6 | |
| 7 | 7 | const avatarImg = await bogbot.visual(await bogbot.pubkey()) |
| 8 | 8 | |
| 9 | const existingImage = await bogbot.find('image') | |
| 9 | const existingImage = await bogbot.get('image') | |
| 10 | 10 | |
| 11 | if (existingImage) { avatarImg.src = await bogbot.find(existingImage)} | |
| 11 | if (existingImage) { avatarImg.src = await bogbot.get(existingImage)} | |
| 12 | 12 | |
| 13 | 13 | avatarImg.style = 'height: 30px; width: 30px; float: left; margin-right: 5px; object-fit: cover;' |
| 14 | 14 | |
| … | … | @@ -67,7 +67,7 @@ export const profile = async () => { |
| 67 | 67 | |
| 68 | 68 | div.appendChild(h('div', [await bogbot.pubkey()])) |
| 69 | 69 | |
| 70 | const name = await bogbot.find('name') | |
| 70 | const name = await bogbot.get('name') | |
| 71 | 71 | |
| 72 | 72 | const namer = h('input', { |
| 73 | 73 | placeholder: name || 'Name yourself' |
| … | … | @@ -22,7 +22,7 @@ render.blob = async (blob) => { |
| 22 | 22 | div.appendChild(h('a', {href: '#' + blob.substring(0, 44), id: 'name'}, [blob.substring(0, 10)])) |
| 23 | 23 | div.appendChild(h('a', {href: '#' + hash, style: 'float: right;'}, [ts])) |
| 24 | 24 | div.appendChild(h('div', {id: opened.substring(13)})) |
| 25 | const content = await bogbot.find(opened.substring(13)) | |
| 25 | const content = await bogbot.get(opened.substring(13)) | |
| 26 | 26 | if (content) { |
| 27 | 27 | await render.blob(content) |
| 28 | 28 | } |
| … | … | @@ -39,7 +39,7 @@ render.blob = async (blob) => { |
| 39 | 39 | node.textContent = yaml.name |
| 40 | 40 | } |
| 41 | 41 | if (yaml.image && node.id === 'image') { |
| 42 | const image = await bogbot.find(yaml.image) | |
| 42 | const image = await bogbot.get(yaml.image) | |
| 43 | 43 | node.src = image |
| 44 | 44 | } |
| 45 | 45 | }) |
| … | … | @@ -53,7 +53,7 @@ render.hash = async (hash, scroller) => { |
| 53 | 53 | |
| 54 | 54 | scroller.insertBefore(div, scroller.firstChild) |
| 55 | 55 | |
| 56 | const sig = await bogbot.find(hash) | |
| 56 | const sig = await bogbot.get(hash) | |
| 57 | 57 | |
| 58 | 58 | if (sig) { |
| 59 | 59 | await render.blob(sig) |