xmtp / libxmtp

MIT License
33 stars 13 forks source link

Register legacy keys on first use #813

Closed neekolas closed 1 month ago

neekolas commented 1 month ago

tl;dr

When creating a client with legacy keys there are no signature requests, so we need to call identity.register() after the identity updates are published as part of Identity::new(). Otherwise it will leave clients in a half-registered state with no way for callers to fix.

Next up

We need tests that generate new legacy keys (not just static fixtures) to properly test this case. We should add those next.

neekolas commented 1 month ago

That's fair. Can do as a refactor later.