diff --git a/solanaceae/contact/components.hpp b/solanaceae/contact/components.hpp index fa5c0bd..3b309f3 100644 --- a/solanaceae/contact/components.hpp +++ b/solanaceae/contact/components.hpp @@ -43,6 +43,14 @@ namespace Contact::Components { std::string name; }; + // stable, probably unique, ID + // eg for tox this would be the public key of the contact + // if the protocol does not have its own ids, you can use a hash or a random byte array + // TODO: make more length specific variants? + struct ID { + std::vector data; + }; + // (display)alias // tag to signal an avatar change, and the texture needs to be reloaded diff --git a/solanaceae/contact/components_id.inl b/solanaceae/contact/components_id.inl index c9eea7b..bee2654 100644 --- a/solanaceae/contact/components_id.inl +++ b/solanaceae/contact/components_id.inl @@ -22,6 +22,7 @@ DEFINE_COMP_ID(Contact::Components::Parent) DEFINE_COMP_ID(Contact::Components::ParentOf) DEFINE_COMP_ID(Contact::Components::ContactModel) DEFINE_COMP_ID(Contact::Components::Name) +DEFINE_COMP_ID(Contact::Components::ID) DEFINE_COMP_ID(Contact::Components::TagAvatarInvalidate) DEFINE_COMP_ID(Contact::Components::AvatarMemory) DEFINE_COMP_ID(Contact::Components::AvatarFile)