diff --git a/src/Web/ActivityPub.hs b/src/Web/ActivityPub.hs index 3371d0a..a602b8c 100644 --- a/src/Web/ActivityPub.hs +++ b/src/Web/ActivityPub.hs @@ -223,8 +223,8 @@ instance ActivityPub PublicKey where parseObject o = do mtyp <- optional $ o .: "@type" <|> o .: "type" for_ mtyp $ \ t -> - when (t /= ("Key" :: Text)) $ - fail "PublicKey @type isn't Key" + unless (t == ("Key" :: Text) || t == "CryptographicKey") $ + fail "PublicKey @type isn't Key or CryptographicKey" RefURI authority id_ <- o .: "@id" <|> o .: "id" shared <- o .:|? "isShared" .!= False fmap (authority,) $