This commit is contained in:
Martti Malmi 2023-07-30 00:52:53 +03:00
parent 254f5b2873
commit 683ad43596
2 changed files with 4 additions and 2 deletions

View File

@ -52,7 +52,6 @@ class ChatListItem extends BaseComponent<ChatListItemProps, ChatListItemState> {
}
componentDidMount() {
console.log('list item', this.props.chat);
this.getLatestMsg();
}
@ -80,7 +79,7 @@ class ChatListItem extends BaseComponent<ChatListItemProps, ChatListItemState> {
className={`flex p-2 flex-row gap-4 ${active}`}
onClick={() => route(`/chat/${npub || chat}`)}
>
<Avatar str={npub} width={49} />
<Avatar str={npub || chat} width={49} />
<div className="flex flex-row">
<div className="flex flex-col">
<span className="name">

View File

@ -18,6 +18,9 @@ export const addGroup = (key) => {
};
export const addChatWithInputKey = (inputKey) => {
if (inputKey.indexOf('#') > -1) {
inputKey = inputKey.split('#')[1];
}
if (inputKey.startsWith('nsec')) {
const hexPriv = Key.toNostrHexAddress(inputKey);
hexPriv && addGroup(hexPriv);