STOMP destination для отправки сообщений через WebSocket.
Подключение:
- SockJS endpoint:
/ws - STOMP destination:
/app/chat.send
Клиент отправляет тот же payload, что и REST-эндпоинт отправки сообщения.
Ответы:
- в ответ отправителю приходит сообщение в
/user/queue/chat.delivered - собеседнику отправляется уведомление в
/user/queue/chat.new_message - ошибки приходят в
/user/queue/errors
- https://felmee.comhttps://felmee.com/app/chat.send
- http://localhost:8080http://localhost:8080/app/chat.send
curl -i -X POST \
https://felmee.com/app/chat.send \
-H 'Content-Type: application/json' \
-d '{
"dialog_id": 10,
"reply_message_id": 99,
"text": "Hello",
"files": [
60
]
}'Response
{ "dialog_id": 10, "messages": [ { … } ] }