add first seen, last seen and last activity
This commit is contained in:
		@@ -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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user