After a homeserver stall Element Call showed "Connection lost" while the call bar still looked joined. Handle the fork's io.lotus.call_error: show "Call disconnected" with a Reconnect button (io.lotus.reconnect), and reconnect automatically once sync is back. Fixes #318 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
18 lines
599 B
TypeScript
18 lines
599 B
TypeScript
import { test } from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { parseCallError } from './callError';
|
|
|
|
test('parseCallError (#318)', () => {
|
|
assert.deepEqual(parseCallError({ code: 'CONNECTION_LOST_ERROR', recoverable: true }), {
|
|
code: 'CONNECTION_LOST_ERROR',
|
|
recoverable: true,
|
|
});
|
|
assert.deepEqual(parseCallError({ code: 'E2EE_NOT_SUPPORTED' }), {
|
|
code: 'E2EE_NOT_SUPPORTED',
|
|
recoverable: false,
|
|
});
|
|
assert.equal(parseCallError({ code: null }), null);
|
|
assert.equal(parseCallError({}), undefined);
|
|
assert.equal(parseCallError('x'), undefined);
|
|
});
|