@ -414,9 +414,13 @@ function setMetadata(evt, relay, content) {
timestamp : evt . created _at ,
timestamp : evt . created _at ,
... content ,
... content ,
} ;
} ;
// use only the first profile pic (for now), different pics on each releay are not supported yet
if ( ! user . picture ) {
if ( ! user . picture ) {
user . picture = picture ;
user . picture = picture ;
} // no support (yet) for other picture from same pubkey on different relays
// update profile images
feedContainer . querySelectorAll ( ` [data-pubkey= ${ user . pubkey . slice ( 0 , 12 ) } ] ` )
. forEach ( img => img . setAttribute ( 'src' , picture ) ) ;
}
}
}
// if (tempContactList[relay]) {
// if (tempContactList[relay]) {
// const updates = tempContactList[relay].filter(update => update.pubkey === evt.pubkey);
// const updates = tempContactList[relay].filter(update => update.pubkey === evt.pubkey);
@ -470,6 +474,7 @@ function getMetadata(evt, relay) {
loading : 'lazy' ,
loading : 'lazy' ,
src : userImg ,
src : userImg ,
title : ` ${ userName } on ${ host } ${ userAbout } ` ,
title : ` ${ userName } on ${ host } ${ userAbout } ` ,
data : { pubkey : user . pubkey . slice ( 0 , 12 ) } ,
} ) : elemCanvas ( evt . pubkey ) ;
} ) : elemCanvas ( evt . pubkey ) ;
const isReply = evt . tags . some ( hasEventTag ) ;
const isReply = evt . tags . some ( hasEventTag ) ;
const replies = replyList . filter ( ( reply ) => reply . tags [ 0 ] [ 1 ] === evt . id ) ;
const replies = replyList . filter ( ( reply ) => reply . tags [ 0 ] [ 1 ] === evt . id ) ;