Skip to content

Commit 8f7cd7b

Browse files
committed
Fix #245
1 parent caedff2 commit 8f7cd7b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/smithereen/routes/ActivityPubRoutes.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,13 @@ else if(o!=null)
904904
}
905905
if(fa.needUpdate() && canUpdate){
906906
try{
907+
Actor oldActor=actor;
907908
actor=ctx.getObjectLinkResolver().resolve(activity.actor.link, Actor.class, true, true, true);
909+
910+
// Temporary fix until https://codeberg.org/superseriousbusiness/gotosocial/issues/4565 gets released and everyone updates to that version.
911+
// Somehow, Application objects could end up interpreted as users in some previous Smithereen version.
912+
if(actor instanceof ActivityPubApplication && oldActor instanceof ForeignUser fu)
913+
actor=ctx.getUsersController().getUserOrThrow(fu.id);
908914
}catch(ObjectNotFoundException x){
909915
LOG.debug("Exception while refreshing remote actor {}", activity.actor.link, x);
910916
}

0 commit comments

Comments
 (0)