添加一点注释

This commit is contained in:
meng_xi_pan
2025-03-14 23:42:48 +08:00
parent 3d1a58130d
commit fcd9413beb
4 changed files with 12 additions and 42 deletions

View File

@@ -208,14 +208,14 @@ def get_recent_group_speaker(chat_stream_id: int, sender, limit: int = 12) -> li
if not recent_messages:
return []
who_chat_in_group = []
who_chat_in_group = [] # ChatStream列表
duplicate_removal = []
for msg_db_data in recent_messages:
user_info = UserInfo.from_dict(msg_db_data["user_info"])
if (user_info.user_id, user_info.platform) != sender \
and (user_info.user_id, user_info.platform) != (global_config.BOT_QQ, "qq") \
and (user_info.user_id, user_info.platform) not in duplicate_removal:
and (user_info.user_id, user_info.platform) not in duplicate_removal: # 排除重复排除消息发送者排除bot(此处bot的平台强制为了qq可能需要更改)
duplicate_removal.append((user_info.user_id, user_info.platform))
chat_info = msg_db_data.get("chat_info", {})