diff --git a/src/solanaceae/contact/components.hpp b/src/solanaceae/contact/components.hpp index 2d1c331..febaf2c 100644 --- a/src/solanaceae/contact/components.hpp +++ b/src/solanaceae/contact/components.hpp @@ -108,7 +108,21 @@ namespace Contact::Components { } }; - // last seen (not disconnected?) + // the first time *we* have seen the contact + struct FirstSeen { + uint64_t ts {0}; + }; + + struct LastSeen { + // update rate might vary, check connection state first + uint64_t ts {0}; + }; + + struct LastActivity { + // message observed + // maybe status set + uint64_t ts {0}; + }; } // Contact::Components diff --git a/src/solanaceae/contact/components_id.inl b/src/solanaceae/contact/components_id.inl index 46006d0..819b72e 100644 --- a/src/solanaceae/contact/components_id.inl +++ b/src/solanaceae/contact/components_id.inl @@ -37,6 +37,9 @@ DEFINE_COMP_ID(Contact::Components::AvatarMemory) DEFINE_COMP_ID(Contact::Components::AvatarFile) DEFINE_COMP_ID(Contact::Components::ConnectionState) DEFINE_COMP_ID(Contact::Components::StatusText) +DEFINE_COMP_ID(Contact::Components::FirstSeen) +DEFINE_COMP_ID(Contact::Components::LastSeen) +DEFINE_COMP_ID(Contact::Components::LastActivity) #undef DEFINE_COMP_ID