How to use the vk-io.UpdateSource.WEBSOCKET function in vk-io

To help you get started, we’ve selected a few vk-io examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github negezor / vk-io / packages / streaming / src / streaming.ts View on Github external
private handleEvent(event: IStreamingContextPayload): Promise {
		const context = new StreamingContext({
			vk: this.vk,
			payload: event,

			state: {},

			updateType: 'publication',
			source: UpdateSource.WEBSOCKET
		});

		return this.vk.updates.dispatchMiddleware(context);
	}