File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,16 @@ export class ContentComponent {
298
298
} else {
299
299
i = res . push ( { safeWord : this . utilities . sanitizeUrlAndBypass ( token ) , word : token . substring ( 6 ) , token : decoded . type } ) ;
300
300
}
301
+ } else if ( token . startsWith ( '@' ) ) {
302
+ const username = token . substring ( 1 ) ;
303
+ const npub = this . profileService . following . find ( ( follower ) => follower . name === username ) ?. npub ;
304
+ if ( npub ) {
305
+ const decoded = nip19 . decode ( npub ) ;
306
+ const val = decoded . data as any ;
307
+ i = res . push ( { safeWord : this . utilities . sanitizeUrlAndBypass ( token ) , word : val , token : decoded . type } ) ;
308
+ } else {
309
+ res [ i ] += token ;
310
+ }
301
311
} else if ( token . startsWith ( 'http://' ) || token . startsWith ( 'https://' ) ) {
302
312
if ( this . isImage ( token ) ) {
303
313
i = res . push ( { safeWord : this . utilities . sanitizeUrlAndBypass ( token ) , word : token , token : 'image' } ) ;
You can’t perform that action at this time.
0 commit comments