When parsing actor, allow missing sshKey, treat it the same as []

This commit is contained in:
fr33domlover 2019-10-19 09:38:05 +00:00
parent bc379a864f
commit 96c6904b46

View file

@ -370,7 +370,7 @@ instance ActivityPub Actor where
<*> withAuthorityMaybeO authority (o .:? "followers")
<*> withAuthorityMaybeO authority (o .:? "following")
<*> withAuthorityT authority (parsePublicKeySet =<< o .: "publicKey")
<*> (traverse (withAuthorityO authority . return) =<< o .: "sshKey")
<*> (traverse (withAuthorityO authority . return) =<< o .:? "sshKey" .!= [])
toSeries authority
(Actor id_ typ musername mname msummary inbox outbox followers following pkeys skeys)
= "id" .= ObjURI authority id_