fix: add created_by_username parameter to BountyService.add_bounty
The add_bounty method now accepts created_by_username parameter to store the creator's username for display purposes.
This commit is contained in:
@@ -124,6 +124,7 @@ class BountyService:
|
||||
text: Optional[str] = None,
|
||||
link: Optional[str] = None,
|
||||
due_date_ts: Optional[int] = None,
|
||||
created_by_username: Optional[str] = None,
|
||||
) -> Bounty:
|
||||
"""Add a new bounty to the room. Requires admin permission."""
|
||||
if not self.is_admin(room_id, user_id):
|
||||
@@ -141,6 +142,7 @@ class BountyService:
|
||||
bounty = Bounty(
|
||||
id=room_data.next_id,
|
||||
created_by_user_id=user_id,
|
||||
created_by_username=created_by_username,
|
||||
text=text,
|
||||
link=link,
|
||||
due_date_ts=due_date_ts,
|
||||
|
||||
Reference in New Issue
Block a user