File tree 2 files changed +28
-5
lines changed 2 files changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ Version 0.4.5
6
6
7
7
To be released.
8
8
9
+ - Fixed the bug where the migration dashboard had not been shown correctly
10
+ when the aliases of the account contained an actor whose the server was
11
+ unreachable. [[ #98 ]]
12
+
13
+ [ #98 ] : https://github.com/fedify-dev/hollo/issues/98
14
+
9
15
10
16
Version 0.4.4
11
17
-------------
Original file line number Diff line number Diff line change @@ -441,10 +441,19 @@ accounts.get("/:id/migrate", async (c) => {
441
441
if ( accountOwner == null ) return c . notFound ( ) ;
442
442
const username = `@${ accountOwner . handle } ` ;
443
443
const aliases = await Promise . all (
444
- uniq ( accountOwner . account . aliases ) . map ( async ( alias ) => ( {
445
- iri : alias ,
446
- handle : await getActorHandle ( new URL ( alias ) ) ,
447
- } ) ) ,
444
+ uniq ( accountOwner . account . aliases ) . map ( async ( alias ) => {
445
+ let handle : Awaited < ReturnType < typeof getActorHandle > > | null ;
446
+ try {
447
+ handle = await getActorHandle ( new URL ( alias ) ) ;
448
+ } catch ( e ) {
449
+ if ( e instanceof TypeError ) {
450
+ handle = null ;
451
+ } else {
452
+ throw e ;
453
+ }
454
+ }
455
+ return { iri : alias , handle } ;
456
+ } ) ,
448
457
) ;
449
458
const [ { followsCount } ] = await db
450
459
. select ( { followsCount : count ( ) } )
@@ -497,7 +506,15 @@ accounts.get("/:id/migrate", async (c) => {
497
506
< ul >
498
507
{ aliases . map ( ( { iri, handle } ) => (
499
508
< li >
500
- < tt > { handle } </ tt > (< tt > { iri } </ tt > )
509
+ { handle == null ? (
510
+ < >
511
+ < tt > { iri } </ tt > (The server is not available.)
512
+ </ >
513
+ ) : (
514
+ < >
515
+ < tt > { handle } </ tt > (< tt > { iri } </ tt > )
516
+ </ >
517
+ ) }
501
518
</ li >
502
519
) ) }
503
520
</ ul >
You can’t perform that action at this time.
0 commit comments