avallef commited on
Commit
b53c669
·
1 Parent(s): e3cb794

Fixed typo and added position to touch

Browse files
server/src/socket/routes/send_vibration.ts CHANGED
@@ -34,13 +34,17 @@ export function SendVibrationHandler(ctx: Context<SendVibrationPayload>) {
34
  const p = ctx.payload;
35
 
36
  ctx.user.currentRoom.broadcast(JSON.stringify({
37
- message: "receieve_touch",
38
  id: ctx.user.id + "_" + p.id,
39
  type: p.type,
40
  user: {
41
  username: ctx.user.username,
42
  id: ctx.user.id,
43
  },
 
 
 
 
44
  color: p.color || "#FF0000",
45
  intensity: p.intensity ?? 1,
46
  }))
 
34
  const p = ctx.payload;
35
 
36
  ctx.user.currentRoom.broadcast(JSON.stringify({
37
+ message: "receive_touch",
38
  id: ctx.user.id + "_" + p.id,
39
  type: p.type,
40
  user: {
41
  username: ctx.user.username,
42
  id: ctx.user.id,
43
  },
44
+ position: {
45
+ x: p.position.x,
46
+ y: p.position.y
47
+ },
48
  color: p.color || "#FF0000",
49
  intensity: p.intensity ?? 1,
50
  }))