feat: Implement enhanced user profiles with social features including direct messaging, post comments, and reposts, and introduce new routing for Docs and Changelog views.

This commit is contained in:
2026-01-18 13:10:12 +01:00
parent 959b453d69
commit 62280265b4
23 changed files with 1826 additions and 458 deletions

View File

@@ -0,0 +1,46 @@
const { io } = require("socket.io-client");
const socket = io("http://localhost:3000");
const walletAddress = "8vRn2vQb3RsDw2yNtyQESodn7Tr6THzgAgn1ai7srdvM"; // Use the one from logs
const username = "TestUser";
console.log("Connecting to server...");
socket.on("connect", () => {
console.log("Connected:", socket.id);
socket.emit("join", { walletAddress, username });
});
socket.on("balanceUpdated", (data) => {
console.log("Joined successfully, balance:", data.balance);
console.log("Requesting profile...");
socket.emit("getProfile", walletAddress);
});
socket.on("profileData", (data) => {
console.log("SUCCESS: Profile data received!");
console.log("Username:", data.username);
console.log("Comment Count Type:", typeof data.posts[0]?.comment_count); // Should be number/string, not BigInt (object in JS if not serialized)
// Check if serialization worked (BigInts become strings usually)
// But data over JSON is already parsed.
console.log("Data sample:", JSON.stringify(data, null, 2));
process.exit(0);
});
socket.on("error", (err) => {
console.error("Error received:", err);
process.exit(1);
});
socket.on("disconnect", () => {
console.log("Disconnected from server");
});
// Timeout
setTimeout(() => {
console.error("Timeout waiting for profile data");
process.exit(1);
}, 5000);