chamesu
Version:
This package contains all packages of the chat application.
24 lines (18 loc) • 624 B
text/typescript
/*
* Copyright (c) 2022.
* Author Peter Placzek (tada5hi)
* For the full copyright and license information,
* view the LICENSE file that was distributed with this source code.
*/
import {MemorySocketEventMessage, publishEventForSocketServer} from "../../memory-event-bus/socket";
export interface RecordEventOptions {
socketNamespace?: string
}
export class RecordEvent {
protected publish(data: MemorySocketEventMessage) {
data.namespace = this.options.socketNamespace ?? '/';
publishEventForSocketServer(data);
}
constructor(public readonly options: RecordEventOptions) {
}
}