Spaces:
Runtime error
Runtime error
Added user info to set_username response
Browse files
server/src/socket/routes/set_username.ts
CHANGED
|
@@ -13,7 +13,12 @@ export function SetUsernameHandler(ctx: Context<SetUsernamePayload>) {
|
|
| 13 |
|
| 14 |
return ctx.ws.send(JSON.stringify({
|
| 15 |
"message": "set_username_response",
|
| 16 |
-
"status": "success"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
}))
|
| 18 |
}
|
| 19 |
|
|
|
|
| 13 |
|
| 14 |
return ctx.ws.send(JSON.stringify({
|
| 15 |
"message": "set_username_response",
|
| 16 |
+
"status": "success",
|
| 17 |
+
"user": {
|
| 18 |
+
id: ctx.user.id,
|
| 19 |
+
username: ctx.user.username,
|
| 20 |
+
currentRoom: ctx.user.currentRoom
|
| 21 |
+
}
|
| 22 |
}))
|
| 23 |
}
|
| 24 |
|