Files
goose/test-matrix-setup.js
spencrmartin 9f33858bb2 feat: Complete Matrix integration with login persistence and message sync
- Fix Matrix login 403 error by switching to matrix.tchncs.de homeserver
- Implement bidirectional message synchronization between Goose and Matrix
- Fix room creation bug ensuring friends join correct collaborative session room
- Add Matrix login persistence with localStorage and auto-login functionality
- Enhanced error handling for Matrix authentication and registration
- Add comprehensive Matrix setup documentation and test utilities
2025-11-13 22:29:30 -05:00

29 lines
987 B
JavaScript

// Quick test script for Matrix connection
const testMatrixConnection = async () => {
try {
// Test if matrix.org is reachable
const response = await fetch('https://matrix.org/_matrix/client/versions');
const data = await response.json();
console.log('✅ Matrix.org is reachable');
console.log('Supported versions:', data.versions);
// Test registration endpoint
const registerTest = await fetch('https://matrix.org/_matrix/client/r0/register', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ username: 'test', password: 'test' })
});
console.log('Registration endpoint status:', registerTest.status);
if (registerTest.status === 400) {
console.log('✅ Registration endpoint is working (400 = missing auth, which is expected)');
}
} catch (error) {
console.error('❌ Matrix connection failed:', error);
}
};
// Run the test
testMatrixConnection();