mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-05-16 13:55:28 +08:00
Merge pull request #5520 from YuF-9468/fix-issue-5211-telegram-username-fallback
This commit is contained in:
@@ -112,8 +112,8 @@ class MessageChain(ChainBase):
|
|||||||
channel = info.channel
|
channel = info.channel
|
||||||
# 用户ID
|
# 用户ID
|
||||||
userid = info.userid
|
userid = info.userid
|
||||||
# 用户名
|
# 用户名(当渠道未提供公开用户名时,回退为 userid 的字符串,避免后续类型校验异常)
|
||||||
username = info.username or userid
|
username = str(info.username) if info.username not in (None, "") else str(userid)
|
||||||
if userid is None or userid == '':
|
if userid is None or userid == '':
|
||||||
logger.debug(f'未识别到用户ID:{body}{form}{args}')
|
logger.debug(f'未识别到用户ID:{body}{form}{args}')
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user