workadventure/back/src/Model/Websocket/Message.ts
gparant 4e1115725b Add io socket message to share user position.
- Add message 'user-position' to share position in a room.
 - Change JoinRoomMessage to MessageUserPosition to have all data to share position and user information
 - Fix error alias to build
2020-04-04 12:42:02 +02:00

17 lines
331 B
TypeScript

export class Message {
userId: string;
roomId: string;
constructor(message: string) {
let data = JSON.parse(message);
this.userId = data.userId;
this.roomId = data.roomId;
}
toJson() {
return {
userId: this.userId,
roomId: this.roomId,
}
}
}