Files
Govor/docs/endpoints/friendshipcontroller.md
T
Artemy 632ac04b56 Add forwarding, friend controls, and benefits
Add message forwarding and reply lookup, friend removal and blocking endpoints, and database-backed Govor+ privileges with customizable profile tags. Include migrations, integration tests, and updated API and operations documentation.
2026-10-31 18:29:40 +07:00

1.5 KiB
Raw Blame History

Друзья и поиск

Bearer token обязателен; отдельная роль в атрибуте не задана.

Метод Маршрут Результат
GET /api/friends UserDto[] друзей
GET /api/friends/search?query=Арт UserDto[] результатов поиска
[{
  "id":"11111111-1111-1111-1111-111111111111",
  "username":"Артём",
  "description":"",
  "wasOnline":"2026-10-03T00:00:00Z",
  "iconId":"00000000-0000-0000-0000-000000000000",
  "isOnline":false
}]

Пустой/пробельный query возвращает 400 строкой "Query cannot be empty". Успех — 200; серверные ошибки — 500 с объектом error. Не смешивайте UserDto и UserProfileDto: у второго нет wasOnline.

Изменение заявок выполняется через FriendsHub. HTTP-контроллер не содержит команды отправки, принятия и отклонения.

Статус isOnline зависит от состояния процесса и подключения к presence. Он не является гарантией доставки сообщений или фоновой доступности устройства.

Источник: Govor.API/Controllers/Friends/FriendshipController.cs.