Skip to content

Commit f78105b

Browse files
author
0xMett
committed
feat(handlers): pass chat.title when registering groups
Update welcome and moderation handlers to forward the group title to register_chat so it gets persisted for later lookup.
1 parent b3e211a commit f78105b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/python_italy_bot/handlers/moderation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async def _handle_force_group_registration(
6464
await message.reply_text(strings.ONLY_ADMINS)
6565
return
6666

67-
await moderation_service.register_chat(chat.id)
67+
await moderation_service.register_chat(chat.id, chat.title)
6868
await message.reply_text(strings.GROUP_REGISTERED.format(chat_id=chat.id))
6969

7070

src/python_italy_bot/handlers/welcome.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def _handle_new_member(
8282
if user is None or chat is None:
8383
return
8484

85-
await moderation_service.register_chat(chat.id)
85+
await moderation_service.register_chat(chat.id, chat.title)
8686

8787
# Track the new member explicitly: middleware tracks effective_user (the admin
8888
# when someone is added by an admin), but we need to track the joined member.

0 commit comments

Comments
 (0)