txlyre 1 day ago
parent
commit
903d89272c
2 changed files with 2 additions and 2 deletions
  1. 1 1
      commands.py
  2. 1 1
      openkriemy.py

+ 1 - 1
commands.py

@@ -894,7 +894,7 @@ async def chess_handler(bot, event, command):
         args = command.args[1:]
         args = command.args[1:]
 
 
     peer_id = str(get_peer_id(event.peer_id))
     peer_id = str(get_peer_id(event.peer_id))
-    result = await subcommand[0](bot.chess, peer_id if not event.is_private and (name == "create" or (peer_id in chess.sessions and name not in ("start", "from"))) else event.sender.id, *args)
+    result = await subcommand[0](bot.chess, peer_id if not event.is_private and (name == "create" or (peer_id in bot.chess.sessions and name not in ("start", "from"))) else event.sender.id, *args)
 
 
     for reply in result:
     for reply in result:
         if isinstance(reply, bytes):
         if isinstance(reply, bytes):

+ 1 - 1
openkriemy.py

@@ -78,7 +78,7 @@ async def on_message(event):
     try:
     try:
         command = parse_command(text)
         command = parse_command(text)
     except ValueError:
     except ValueError:
-        if chess and event.sender.id in chess.sessions:
+        if chess and (event.sender.id in chess.sessions or str(peer_id) in chess.sessions):
             reply = await event.get_reply_message()
             reply = await event.get_reply_message()
             if reply and get_peer_id(reply.from_id) == await bot.get_peer_id("me") and reply.media:
             if reply and get_peer_id(reply.from_id) == await bot.get_peer_id("me") and reply.media:
                 text = text.strip()
                 text = text.strip()