🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-05-29 01:27:37 +00:00
parent 22b579be02
commit 117f426db2
6 changed files with 16 additions and 10 deletions

View File

@@ -451,7 +451,7 @@ async def build_anonymous_messages(messages: List[Dict[str, Any]]) -> str:
def get_anon_name(platform, user_id):
# print(f"get_anon_name: platform:{platform}, user_id:{user_id}")
# print(f"global_config.bot.qq_account:{global_config.bot.qq_account}")
if user_id == global_config.bot.qq_account:
# print("SELF11111111111111")
return "SELF"
@@ -488,11 +488,11 @@ async def build_anonymous_messages(messages: List[Dict[str, Any]]) -> str:
content = content.replace("", "")
# if not all([platform, user_id, timestamp is not None]):
# continue
# continue
anon_name = get_anon_name(platform, user_id)
# print(f"anon_name:{anon_name}")
# 处理 回复<aaa:bbb>
reply_pattern = r"回复<([^:<>]+):([^:<>]+)>"
match = re.search(reply_pattern, content)
@@ -514,7 +514,7 @@ async def build_anonymous_messages(messages: List[Dict[str, Any]]) -> str:
new_content = ""
last_end = 0
for m in at_matches:
new_content += content[last_end:m.start()]
new_content += content[last_end : m.start()]
bbb = m.group(2)
try:
anon_at = get_anon_name(platform, bbb)