fix: improve plugins functionality with server management

This commit is contained in:
2026-04-29 20:33:54 +02:00
parent b8f6d58d99
commit fa2cca6fa4
82 changed files with 1708 additions and 303 deletions

View File

@@ -1,7 +1,4 @@
import {
defaultIfEmpty,
firstValueFrom
} from 'rxjs';
import { defaultIfEmpty, firstValueFrom } from 'rxjs';
import { type Message } from '../../shared-kernel';
import { dispatchIncomingMessage } from './messages-incoming.handlers';
@@ -69,10 +66,9 @@ describe('dispatchIncomingMessage room-scoped sync', () => {
});
it('sends full sync for requested room even when another room is viewed', async () => {
const roomBMessages = [
createMessage({ id: 'message-b1', roomId: 'room-b', timestamp: 5 }),
createMessage({ id: 'message-b2', roomId: 'room-b', timestamp: 15 })
];
const roomBMessageOne = createMessage({ id: 'message-b1', roomId: 'room-b', timestamp: 5 });
const roomBMessageTwo = createMessage({ id: 'message-b2', roomId: 'room-b', timestamp: 15 });
const roomBMessages = [roomBMessageOne, roomBMessageTwo];
const getMessages = vi.fn(async (roomId: string) => roomId === 'room-b'
? roomBMessages
: [createMessage({ id: 'message-a1', roomId: 'room-a', timestamp: 200 })]);