It's been a long time since i've given this
project some love, so this is the price i have
to pay for it. The ActivityPub stuff is
seriously screwed because it uses an outdated
version of HashBrown and rdf-types seems to have
changed some of its API, too. That's gonna take
a while to clean up.
This is a major refactor that introduces a new
generic type Id<T, I> for tagging any ID with the
model they reference without any runtime overhead.
From now on, it should be pretty much impossible
to pass e.g. a note ID to a function that expects,
say, an account ID.
Furthermore, the follow and like tables have been
simplified to use the two IDs that define the
relationship as a composite primary key.
Finally, likes now have a memory cache.
This removes some accidental bugs from mindlessly
retyping the original code as well as some
copy-paste errors.
Also adds tests for nyanoblog's extensions.
The HMAC secret was stored as raw bytes in the
config object, which required creating an
entirely new DecodingKey and EncodingKey struct
every whenever checking the password.
This patch stores these structures directly in
the config object, preventing new allocations.
The repository layer is the central gateway to
the data storage subsystem, so it should also be
solely responsible for transforming data coming
from the rest of the app into the appropriate
format.