Add chat input functionality in ChatBoxComponent and backend support for sending server messages

This commit is contained in:
2026-08-02 18:30:33 +02:00
parent 8533cfa365
commit 065db06e16
7 changed files with 207 additions and 4 deletions
+4
View File
@@ -32,6 +32,8 @@ tags:
description: Actions related to small features on the site such as displaying vote stats or pt/rank stats
- name: chatInfo
description: All actions related to chat information
- name: server-message
description: All actions related to sending messages to servers
paths:
/api/team/{team}:
$ref: './schemas/team/team.yml#/getTeam'
@@ -103,3 +105,5 @@ paths:
$ref: './schemas/chat_info/chat_info.yml#/PartyName'
/api/site/chat/player/{uuid}/name:
$ref: './schemas/chat_info/chat_info.yml#/UserName'
/api/site/chat/send-message/{server}:
$ref: './schemas/server-message/server-message.yml#/sendServerMessage'
@@ -0,0 +1,44 @@
sendServerMessage:
post:
tags:
- server-message
summary: Send a message to a specific server
operationId: sendServerMessage
parameters:
- $ref: '#/components/parameters/Server'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ServerMessageRequest'
responses:
'202':
description: Message accepted and sent
'404':
description: Server not found or not connected
'400':
description: Invalid request
components:
parameters:
Server:
name: server
in: path
required: true
schema:
type: string
description: The name of the server
schemas:
ServerMessageRequest:
type: object
required:
- uuid
- message
properties:
uuid:
type: string
format: uuid
description: The sender UUID
message:
type: string
description: The message to send