Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 13, 2025

Summary

Implemented a comprehensive vote logging system that sends decentralized logs of all voting activities to subscribed users, addressing issue #53.

Decentralized logging: Vote logs are sent to all subscribed users, ensuring fair and tamper-proof vote tracking
User subscription management: Commands to enable/disable vote log notifications
Comprehensive vote tracking: Logs both personal karma transfers and collective voting activities
Rich vote information: Includes timestamps, chat context, voter/target details, and karma changes
Multi-language support: Commands available in Russian and English
Privacy-conscious: Voters and recipients don't receive their own vote logs

Implementation Details

New User Property

  • Added vote_log_subscription boolean field to user data model

Commands Added

  • "включить лог голосований" / "enable vote log" - Enable vote log subscription
  • "отключить лог голосований" / "disable vote log" - Disable vote log subscription

Vote Log Features

  • Personal karma transfers: Shows when user A transfers X karma to user B
  • Collective votes: Shows ongoing votes and completion with karma changes
  • Timestamp and chat context: Each log includes time and chat information
  • Vote progress tracking: Shows current votes vs required votes for collective actions

Technical Implementation

  • send_vote_log(): Distributes vote logs to all subscribed users
  • build_vote_log_message(): Creates formatted log messages with emojis and context
  • Enhanced help system with vote log command documentation
  • Integrated with existing karma voting system without breaking changes

Test plan

  • Syntax validation for all modified Python files
  • Integration with existing command registration system
  • Proper error handling for failed message delivery
  • Help message integration

🤖 Generated with Claude Code


Resolves #53

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #53
@konard konard self-assigned this Sep 13, 2025
- Add vote_log_subscription property to user data model
- Create patterns for enable/disable vote log commands (Russian & English)
- Implement enable_vote_log() and disable_vote_log() command methods
- Add comprehensive vote logging system that sends notifications to subscribed users
- Include detailed vote information: timestamp, chat, voter, target, karma changes
- Support both personal karma transfers and collective votes
- Prevent self-notifications (voters and recipients don't get their own logs)
- Add vote log commands to help message documentation
- Maintain decentralized, tamper-proof vote log distribution

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@konard konard changed the title [WIP] Log votes Implement decentralized vote logging system Sep 14, 2025
@konard konard marked this pull request as ready for review September 14, 2025 00:02
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.

Log votes

2 participants