解决打招呼消息的bug

This commit is contained in:
zw
2025-09-08 19:16:05 +08:00
parent a6d5330c73
commit 7a8380af9c
4 changed files with 48 additions and 71 deletions

View File

@@ -11,12 +11,11 @@ anchorList: list[AnchorModel] = []
# 线程锁
anchorListLock = threading.Lock()
# 打招呼数据
prologueList = []
prologueList: list[str] = []
# 评论列表
commentsList = []
# 存储主播名和session_id的字典
anchorWithSession = {}
# 前端传递的token
token = ''
# 前端传递的
@@ -30,10 +29,14 @@ def removeModelFromAnchorList(model: AnchorModel):
with anchorListLock:
anchorList.remove(model)
# 添加数据
def addModelToAnchorList(models: list[Dict[str, Any]]):
with anchorListLock:
for dic in models:
obj = AnchorModel.dictToModel(dic)
anchorList.append(obj)
# 添加打招呼语
def addDataToPrologue(data: list[str]):
prologueList = data