🐛 修复用户邀请识别错误的问题

This commit is contained in:
洛水居室 2022-10-19 19:03:08 +08:00
parent 4fc6f901f7
commit 8c12237e85
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -46,8 +46,8 @@ class BotJoiningGroupsVerification(Plugin):
logger.error(f"获取信息出现错误 {repr(exc)}") logger.error(f"获取信息出现错误 {repr(exc)}")
elif config.join_groups == JoinGroups.ALLOW_AUTH_USER: elif config.join_groups == JoinGroups.ALLOW_AUTH_USER:
try: try:
user_info = await self.user_service.get_user_by_id(chat.id) user_info = await self.user_service.get_user_by_id(from_user.id)
await self.cookies_service.get_cookies(user_info.user_id, user_info.region) await self.cookies_service.get_cookies(from_user.id, user_info.region)
except (UserNotFoundError, CookiesNotFoundError): except (UserNotFoundError, CookiesNotFoundError):
logger.warning(f"用户 {from_user.full_name}[{from_user.id}] 邀请请求被拒绝") logger.warning(f"用户 {from_user.full_name}[{from_user.id}] 邀请请求被拒绝")
except Exception as exc: except Exception as exc: