diff options
Diffstat (limited to 'client/public/blobs.ts')
| -rw-r--r-- | client/public/blobs.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/public/blobs.ts b/client/public/blobs.ts index 5ba99e9..fcb4ec0 100644 --- a/client/public/blobs.ts +++ b/client/public/blobs.ts @@ -71,6 +71,11 @@ export function createBlob(seeds: [number, number, number, number, number, numbe return `#${[r, g, b].map(v => v.toString(16).padStart(2, '0')).join('')}` } + seeds[4] = seeds[0] + seeds[5] = seeds[1] + seeds[6] = seeds[2] + seeds[7] = seeds[3] + const colors = seeds.map(seedToColor) const blob = document.createElement('blob') as html @@ -129,15 +134,13 @@ export function makeMessage(type: 'in' | 'out' | 'broadcast' | 'system', id: num const seeds: [number, number, number, number, number, number, number, number] = pubkey === '0' ? [27, 28, 32, 45, 49, 58, 91, 28] : pubkeyToBlobs(pubkey) const blob = createBlob(seeds) - blob.addEventListener('click', () => { + if (pubkey !== info?.keypair?.identity) blob.addEventListener('click', () => { if (confirm('do you want to open a direct message with this user?')) { const chat = `@${pubkey}` if (!followed_chats.includes(chat)) { followed_chats.push(chat) - //@ts-expect-error globalThis.refreshChatList() } - //@ts-expect-error globalThis.switchChat(chat) } }) |
