Fix misskey-specific error of existing-but-null avatar. Closes #1689
This commit is contained in:
parent
372b1059c0
commit
a471707a54
@ -52,7 +52,7 @@ func MakeActorFromPerson(person vocab.ActivityStreamsPerson) ActivityPubActor {
|
|||||||
W3IDSecurityV1PublicKey: person.GetW3IDSecurityV1PublicKey(),
|
W3IDSecurityV1PublicKey: person.GetW3IDSecurityV1PublicKey(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if person.GetActivityStreamsIcon() != nil && person.GetActivityStreamsIcon().Len() > 0 {
|
if person.GetActivityStreamsIcon() != nil && person.GetActivityStreamsIcon().Len() > 0 && person.GetActivityStreamsIcon().At(0).GetActivityStreamsImage() != nil {
|
||||||
apActor.Image = person.GetActivityStreamsIcon().At(0).GetActivityStreamsImage().GetActivityStreamsUrl().Begin().GetIRI()
|
apActor.Image = person.GetActivityStreamsIcon().At(0).GetActivityStreamsImage().GetActivityStreamsUrl().Begin().GetIRI()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ func MakeActorFromService(service vocab.ActivityStreamsService) ActivityPubActor
|
|||||||
W3IDSecurityV1PublicKey: service.GetW3IDSecurityV1PublicKey(),
|
W3IDSecurityV1PublicKey: service.GetW3IDSecurityV1PublicKey(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if service.GetActivityStreamsIcon() != nil && service.GetActivityStreamsIcon().Len() > 0 {
|
if service.GetActivityStreamsIcon() != nil && service.GetActivityStreamsIcon().Len() > 0 && service.GetActivityStreamsIcon().At(0).GetActivityStreamsImage() != nil {
|
||||||
apActor.Image = service.GetActivityStreamsIcon().At(0).GetActivityStreamsImage().GetActivityStreamsUrl().Begin().GetIRI()
|
apActor.Image = service.GetActivityStreamsIcon().At(0).GetActivityStreamsImage().GetActivityStreamsUrl().Begin().GetIRI()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user