Address PR #19 review feedback round 3:

- TrackingData.group_id renamed to room_id (works for both group and DM)
- Removed room_id from TrackedBounty (it's just a lightweight pointer)
This commit is contained in:
shokollm
2026-04-02 22:34:19 +00:00
parent 330203e6ef
commit b2854393ae
2 changed files with 13 additions and 18 deletions

View File

@@ -23,16 +23,12 @@ class Bounty:
class TrackedBounty:
"""A bounty that a user is tracking.
Use TrackedBounty when you need to record that a user is tracking a specific
bounty from a specific room. The room_id indicates which room the bounty
was tracked from (useful when users can track bounties across multiple rooms).
For simple tracking lists, just use bounty_id and created_at.
Lightweight relation/pointer - the actual tracking context (including room)
lives in TrackingData, not here.
"""
bounty_id: int
created_at: int
room_id: int
@dataclass
@@ -50,16 +46,16 @@ class RoomData:
@dataclass
class TrackingData:
"""User tracking state within a group.
"""User tracking state within a room (group or DM).
TrackingData vs TrackedBounty:
- Use TrackingData to store ALL tracked bounties for a user in a specific group.
It contains the group_id, user_id, and a list of TrackedBounty entries.
- Use TrackingData to store ALL tracked bounties for a user in a specific room.
It contains the room_id, user_id, and a list of TrackedBounty entries.
- Use TrackedBounty to represent a single tracked bounty entry within that list.
TrackingData is the container, TrackedBounty is the item.
"""
group_id: int
room_id: int
user_id: int
tracked: list[TrackedBounty]