添加一点注释
This commit is contained in:
@@ -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", {})
|
||||
|
||||
Reference in New Issue
Block a user