add first seen, last seen and last activity

This commit is contained in:
Green Sky 2025-01-07 16:31:46 +01:00
parent 2401079c1d
commit e2917c497c
No known key found for this signature in database
2 changed files with 18 additions and 1 deletions

View File

@ -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 } // Contact::Components

View File

@ -37,6 +37,9 @@ DEFINE_COMP_ID(Contact::Components::AvatarMemory)
DEFINE_COMP_ID(Contact::Components::AvatarFile) DEFINE_COMP_ID(Contact::Components::AvatarFile)
DEFINE_COMP_ID(Contact::Components::ConnectionState) DEFINE_COMP_ID(Contact::Components::ConnectionState)
DEFINE_COMP_ID(Contact::Components::StatusText) 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 #undef DEFINE_COMP_ID