Skip to content

Commit

Permalink
修复了无法获取header
Browse files Browse the repository at this point in the history
  • Loading branch information
Polyisoprene committed Jul 25, 2023
1 parent a2d71be commit 7f3b246
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dynamicadaptor/DynamicConversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ async def grpc_formate(message: dict) -> Union[RenderMessage, None]:
"""
message_type = message["cardType"]
message_id = message["extend"]["dynIdStr"]
header = await get_grpc_header(message["modules"][0]["moduleAuthor"])
for i in message["modules"]:
if i["moduleType"] == "module_author":
header = await get_grpc_header(i["moduleAuthor"])
break
# header = await get_grpc_header(message["modules"][0]["moduleAuthor"])

text = await get_grpc_text(message)
# print(text)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "DynamicAdaptor"
version = "0.4.5"
version = "0.4.6"
description = ""
authors = ["DMC <lzxder@outlook.com>"]
readme = "README.md"
Expand Down

0 comments on commit 7f3b246

Please sign in to comment.