| … | … | @@ -438,11 +438,11 @@ async def run_interactive_command(args: argparse.Namespace) -> None: |
| 438 | 438 | logger.info(f"Starting interactive session in room {args.room}") |
| 439 | 439 | logger.info("Type your messages and press Enter to send. Type /quit to exit.") |
| 440 | 440 | |
| 441 | | # Set up the message callback |
| 442 | | client.client.add_event_callback(client._message_callback, RoomMessageText) |
| 441 | # Start listening for messages |
| 442 | logger.info("Starting to listen for messages...") |
| 443 | 443 | |
| 444 | 444 | # Create a task for syncing with the server |
| 445 | | sync_task = asyncio.create_task(client.client.sync_forever(timeout=30000, full_state=True)) |
| 445 | sync_task = asyncio.create_task(client.listen()) |
| 446 | 446 | |
| 447 | 447 | try: |
| 448 | 448 | # Input loop |