Use deterministic, yet random ID as primary key when storing accounts.
We used to have
use uuid::Uuid
//....
// TODO: Investigate why this is broken. Maybe "as_bytes()" returns the same bytes?
// Because it currently always returns 1b4db7eb-4057-5ddf-91e0-36dec72071f5 as UUID.
let uuid = Uuid::new_v5(&Uuid::NAMESPACE_URL, &account.ap_id.as_bytes());
account.ap_id = account.id;
account.id = uuid.to_hyphenated().to_string();
But this, somehow, resulted in the same UUID being used everywhere. It is now reverted to use ap_id, which is a string containing an URL. But at least those are unique!
Use deterministic, yet random ID as primary key when storing accounts.
We used to have
But this, somehow, resulted in the same UUID being used everywhere. It is now reverted to use ap_id, which is a string containing an URL. But at least those are unique!