Skip to content

Commit

Permalink
Merge pull request #82 from hsyhhssyy/patch-1
Browse files Browse the repository at this point in the history
让TestAdapter支持发送无ID消息
  • Loading branch information
vivien8261 authored Jan 5, 2024
2 parents 6b3d7f1 + 0eecd02 commit d513466
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions amiyabot/adapters/test/builder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os
import uuid
import base64

from amiyabot.builtin.messageChain import Chain
Expand All @@ -10,7 +10,10 @@ async def build_message_send(chain: Chain, custom_chain: Optional[CHAIN_LIST] =
chain_data = []
voice_list = []

event_id = chain.data.message_id
if chain.data and chain.data.message_id:
event_id = chain.data.message_id
else:
event_id = str(uuid.uuid4())

if chain_list:
for item in chain_list:
Expand Down

0 comments on commit d513466

Please sign in to comment.