From 67274dbb90e66b7e19c95b5daeb3c34df28009cb Mon Sep 17 00:00:00 2001 From: Martti Malmi Date: Wed, 8 Feb 2023 12:48:25 +0200 Subject: [PATCH] chat list click -> npub --- src/js/Nostr.ts | 2 +- src/js/views/chat/ChatListItem.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/Nostr.ts b/src/js/Nostr.ts index 6a3a0f76..f0ae3dae 100644 --- a/src/js/Nostr.ts +++ b/src/js/Nostr.ts @@ -15,9 +15,9 @@ import { const bech32 = require('bech32-buffer'); /* eslint-disable-line @typescript-eslint/no-var-requires */ import { sha256 } from '@noble/hashes/sha256'; import localForage from 'localforage'; +import { route } from 'preact-router'; import SortedLimitedEventSet from './SortedLimitedEventSet'; -import { route } from 'preact-router'; const startTime = Date.now() / 1000; diff --git a/src/js/views/chat/ChatListItem.js b/src/js/views/chat/ChatListItem.js index dcf33b62..ec266503 100644 --- a/src/js/views/chat/ChatListItem.js +++ b/src/js/views/chat/ChatListItem.js @@ -112,7 +112,7 @@ class ChatListItem extends Component { role="button" tabindex="0" class="chat-item ${activity} ${hasUnseen} ${active}" - onClick=${() => route(`/chat/${this.props.chat}`)} + onClick=${() => route(`/chat/${Nostr.toNostrBech32Address(this.props.chat, 'npub')}`)} > ${iconEl}