Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if logged in, update user activity #403

Merged
merged 3 commits into from
Feb 19, 2025
Merged

if logged in, update user activity #403

merged 3 commits into from
Feb 19, 2025

Conversation

redshiftzero
Copy link
Contributor

@redshiftzero redshiftzero commented Feb 17, 2025

This PR updates the Cyd server with usage data in compliance with Lockdown Systems' Privacy Policy. An API request gets sent after the Plausible analytics data to Cyd server:

When you run this PR against https://github.com/lockdown-systems/cyd-server/pull/128 you'll see:

api-1         | 02-17 20:45 werkzeug     INFO     172.19.0.1 - - [17/Feb/2025 20:45:30] "POST /user/activity HTTP/1.1" 200 -

Copy link
Contributor

@micahflee micahflee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great! Each time you open the Cyd app it updates the last accessed date.

However, if you open the Cyd app and you're not logged in, it should also update the last accessed date as soon as logging in is successful, somewhere around here: https://github.com/lockdown-systems/cyd/blob/main/src/renderer/src/modals/SignInModal.vue#L134-L154

Also, if we ever do #332, it's possible that someone might open Cyd and keep it open and actively in use for weeks but without updating the last accessed timestamp. Maybe there should be a setInterval that just automatically updates it (if logged in) every 6 hours or something. That could live in App.vue. So if the app is open in the background for days and days, we'll have the right day.

@redshiftzero redshiftzero force-pushed the user-activity-endpoint branch from c8fb887 to 49440da Compare February 19, 2025 04:09
@redshiftzero redshiftzero force-pushed the user-activity-endpoint branch from 49440da to c577b07 Compare February 19, 2025 04:10
@micahflee micahflee merged commit eefb6d5 into main Feb 19, 2025
1 check passed
@micahflee micahflee deleted the user-activity-endpoint branch February 19, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants