deploy
This commit is contained in:
parent
4d3834be1d
commit
af049a24a3
2
dist/parseMessage.js
vendored
2
dist/parseMessage.js
vendored
@ -25,6 +25,8 @@ function parseMessage(message) {
|
|||||||
return new messageTypes_1.QueueSong(data.song);
|
return new messageTypes_1.QueueSong(data.song);
|
||||||
case 'CurrentQueue':
|
case 'CurrentQueue':
|
||||||
return new messageTypes_1.CurrentQueue(data.songs);
|
return new messageTypes_1.CurrentQueue(data.songs);
|
||||||
|
case 'CurrentSong':
|
||||||
|
return new messageTypes_1.CurrentSong(data.song);
|
||||||
default:
|
default:
|
||||||
console.error('Unknown message type:', data.type);
|
console.error('Unknown message type:', data.type);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "stuen-common",
|
"name": "stuen-common",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"main": "dist/common.js",
|
"main": "dist/common.js",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"types": "dist/common.d.ts",
|
"types": "dist/common.d.ts",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
ChatMessage, CurrentQueue,
|
ChatMessage, CurrentQueue, CurrentSong,
|
||||||
Join,
|
Join,
|
||||||
ListenerJoined,
|
ListenerJoined,
|
||||||
ListenerLeft,
|
ListenerLeft,
|
||||||
@ -33,6 +33,8 @@ export default function parseMessage(message: string): StuenMessage | null {
|
|||||||
return new QueueSong(data.song);
|
return new QueueSong(data.song);
|
||||||
case 'CurrentQueue':
|
case 'CurrentQueue':
|
||||||
return new CurrentQueue(data.songs)
|
return new CurrentQueue(data.songs)
|
||||||
|
case 'CurrentSong':
|
||||||
|
return new CurrentSong(data.song);
|
||||||
default:
|
default:
|
||||||
console.error('Unknown message type:', data.type);
|
console.error('Unknown message type:', data.type);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user