@ -82,7 +82,7 @@ const renderFeed = bounce(() => {
refreshFollowing ( view . id ) ;
break ;
case 'home' :
const ids = getOwnContacts( ) ;
const ids = view. id ? getContacts ( view . id ) : getOwnContacts( ) ;
[
. . . textNoteList
. filter ( note = > ids . includes ( note . pubkey ) ) ,
@ -269,7 +269,7 @@ const route = (path: string) => {
const contactList = getOwnContacts ( ) ;
if ( contactList . length ) {
subPubkeys ( contactList , onEvent ) ;
view ( ` / ` , { type : 'home' } ) ;
view ( '/' , { type : 'home' } ) ;
} else {
subGlobalFeed ( onEvent ) ;
view ( '/feed' , { type : 'feed' } ) ;
@ -306,6 +306,14 @@ const route = (path: string) => {
subContactList ( contactPubkey , onEvent ) ;
view ( path , { type : 'contacts' , id : contactPubkey } ) ;
}
} else if ( path . length === 73 && path . match ( /^\/timeline\/npub[0-9a-z]+$/ ) ) {
const timelineNpub = path . slice ( 10 ) ;
const { type : timelineType , data : timelinePubkey } = nip19 . decode ( timelineNpub ) ;
if ( timelineType === 'npub' ) {
const timelinePubkeys = getContacts ( timelinePubkey ) ;
subPubkeys ( timelinePubkeys , onEvent ) ;
view ( path , { type : 'home' , id : timelinePubkey } ) ;
}
} else if ( path . length === 65 ) {
const eventID = path . slice ( 1 ) ;
subEventID ( eventID , onEventDetails ) ;
@ -346,6 +354,7 @@ const handleLink = (a: HTMLAnchorElement, e: MouseEvent) => {
|| href . startsWith ( '/note' )
|| href . startsWith ( '/npub' )
|| href . startsWith ( '/contacts/npub' )
|| href . startsWith ( '/timeline/npub' )
|| ( href . startsWith ( '/' ) && href . length === 65 )
) {
route ( href ) ;