Add peer login and expiration activity events (#1090)

Track the even of a user logging in their peer.
Track the event of a peer login expiration.
This commit is contained in:
Misha Bragin
2023-08-17 14:04:04 +02:00
committed by GitHub
parent da8447a67d
commit d4e9087f94
5 changed files with 82 additions and 305 deletions

View File

@@ -695,6 +695,8 @@ func (am *DefaultAccountManager) LoginPeer(login PeerLogin) (*Peer, *NetworkMap,
updatePeerLastLogin(peer, account)
updateRemotePeers = true
shouldStoreAccount = true
am.storeEvent(login.UserID, peer.ID, account.Id, activity.UserLoggedInPeer, peer.EventMeta(am.GetDNSDomain()))
}
peer, updated := updatePeerMeta(peer, login.Meta, account)