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

@@ -872,6 +872,7 @@ func (am *DefaultAccountManager) peerLoginExpirationJob(accountID string) func()
log.Errorf("failed saving peer status while expiring peer %s", peer.ID)
return account.GetNextPeerExpiration()
}
am.storeEvent(peer.UserID, peer.ID, account.Id, activity.PeerLoginExpired, peer.EventMeta(am.GetDNSDomain()))
}
log.Debugf("discovered %d peers to expire for account %s", len(peerIDs), account.Id)