#!/bin/bash echo "Testing GooSeek Chat Functionality" echo "====================================" echo "" # Generate unique IDs MESSAGE_ID="msg-$(date +%s)-$$" CHAT_ID="chat-$(date +%s)-$$" # Create the request payload PAYLOAD=$(cat <&1) EXIT_CODE=$? echo "Response received:" echo "==================" if [ $EXIT_CODE -eq 0 ]; then if [ -z "$RESPONSE" ]; then echo "⚠ Empty response received" else echo "$RESPONSE" | head -50 echo "" echo "Response length: $(echo "$RESPONSE" | wc -c) bytes" fi else echo "✗ Request failed with exit code: $EXIT_CODE" echo "$RESPONSE" fi echo "" echo "===================================="