Skip to content

User id hashes for privacy#39

Merged
micr0-dev merged 4 commits intomainfrom
fix/userIDHashes
Jan 21, 2025
Merged

User id hashes for privacy#39
micr0-dev merged 4 commits intomainfrom
fix/userIDHashes

Conversation

@micr0-dev
Copy link
Copy Markdown
Owner

This pull request includes several changes to improve the metrics management system and update the alt text reminder functionality. The most important changes include adding user ID hashing, modifying the metrics manager to handle existing data, and updating the alt text check queue to use a different identifier.

Metrics Management Improvements:

  • metrics.go: Added SHA-256 hashing for user IDs to enhance privacy. This includes a new hashUserID function and modifications to the MetricEvent struct to store hashed user IDs. [1] [2] [3]
  • metrics.go: Implemented the loadAndHashExistingData function to load existing data and ensure all user IDs are hashed. This function is called during the initialization of the MetricsManager.
  • metrics.go: Modified the saveToFile method to include an optional locking mechanism to ensure thread safety.
  • metrics.go: Moved the run method to the end of the file and reintroduced it with necessary changes to call saveToFile with locking.

Alt Text Reminder Update:

  • main.go: Changed the queuePostForAltTextCheck function to use replyPost.Account.ID instead of replyPost.Account.Acct for queuing alt text checks.

@micr0-dev
Copy link
Copy Markdown
Owner Author

fuck it

@micr0-dev
Copy link
Copy Markdown
Owner Author

fixes #38

@micr0-dev micr0-dev marked this pull request as ready for review January 21, 2025 20:31
@micr0-dev micr0-dev merged commit e839ae6 into main Jan 21, 2025
@micr0-dev micr0-dev deleted the fix/userIDHashes branch January 21, 2025 20:32
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.

1 participant