add a generic way to get a stable id from a contact
This commit is contained in:
parent
5ff7d1cee0
commit
2d73c7272c
@ -43,6 +43,14 @@ namespace Contact::Components {
|
|||||||
std::string name;
|
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<uint8_t> data;
|
||||||
|
};
|
||||||
|
|
||||||
// (display)alias
|
// (display)alias
|
||||||
|
|
||||||
// tag to signal an avatar change, and the texture needs to be reloaded
|
// tag to signal an avatar change, and the texture needs to be reloaded
|
||||||
|
@ -22,6 +22,7 @@ DEFINE_COMP_ID(Contact::Components::Parent)
|
|||||||
DEFINE_COMP_ID(Contact::Components::ParentOf)
|
DEFINE_COMP_ID(Contact::Components::ParentOf)
|
||||||
DEFINE_COMP_ID(Contact::Components::ContactModel)
|
DEFINE_COMP_ID(Contact::Components::ContactModel)
|
||||||
DEFINE_COMP_ID(Contact::Components::Name)
|
DEFINE_COMP_ID(Contact::Components::Name)
|
||||||
|
DEFINE_COMP_ID(Contact::Components::ID)
|
||||||
DEFINE_COMP_ID(Contact::Components::TagAvatarInvalidate)
|
DEFINE_COMP_ID(Contact::Components::TagAvatarInvalidate)
|
||||||
DEFINE_COMP_ID(Contact::Components::AvatarMemory)
|
DEFINE_COMP_ID(Contact::Components::AvatarMemory)
|
||||||
DEFINE_COMP_ID(Contact::Components::AvatarFile)
|
DEFINE_COMP_ID(Contact::Components::AvatarFile)
|
||||||
|
Loading…
Reference in New Issue
Block a user