An Elixir toolkit for the AT Protocol. hexdocs.pm/atex
elixir bluesky atproto decentralization
25
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: test CIDs against :dasl library

+2 -5
+2 -5
lib/atex/lexicon/validators/string.ex
··· 53 53 do: Validators.boolean_validate(Atex.AtURI.match?(value), "should be a valid at:// URI") 54 54 55 55 defp validate_option(value, {:format, "cid"}) do 56 - # TODO: is there a regex provided by the lexicon docs/somewhere? 57 - try do 58 - Multiformats.CID.decode(value) 59 - :ok 60 - rescue 56 + case DASL.CID.new(value) do 57 + {:ok, _} -> :ok 61 58 _ -> {:error, "should be a valid CID", []} 62 59 end 63 60 end