fix-reply-feedback5

This commit is contained in:
Untone 2023-09-18 11:12:25 +03:00
parent 638f4ae407
commit 980b455585
2 changed files with 24 additions and 22 deletions

View File

@ -42,7 +42,8 @@ async def handle_feedback(msg, state):
async def handle_answer(msg):
logger.info("handle answering feedback")
logger.debug(msg)
answered_msg = msg["reply_to_message"]
if "reply_to_message" in msg:
answered_msg = msg.get("reply_to_message")
if "from" not in answered_msg:
answered_msg["from"] = vars(msg.from_user)
r = await get_chat_administrators(msg["chat"]["id"])

View File

@ -28,7 +28,8 @@ async def handle_routing(msg, state):
elif str(cid) == FEEDBACK_CHAT_ID:
# сообщения из группы обратной связи
logger.info("feedback chat message")
if "reply_to_message" in msg:
logger.debug(msg)
if msg.get("reply_to_message"):
await handle_answer(msg)
elif msg["text"] == "/graph":
await handle_command_graph(msg)