Chat

Удалить своё сообщение у всех

Changed on

Удаление у всех, как в Телеграме; «удалить у себя» нет. Сообщение не исчезает из истории: проставляется неснимаемое надгробие deleted_at, seq остаётся занятым, а само сообщение возвращается в ответе. Держатель локальной копии переписки должен обновить запись по deleted_at, а не удалять её и не ждать пропажи из выдачи. Надгробие приходит без тела, вложений, упоминаний, реакций и цитаты; показывать его в ленте не нужно — ответ на удалённое показывает исходное удалённым. Удалённое сразу перестаёт считаться непрочитанным и упоминанием, уходит из строки списка бесед и карточек центра уведомлений, а участники получают событие chat.message.edited с этим сообщением. Удаляет только автор и только сообщение вида text или file; окна по времени здесь нет. Повторное удаление ничего не меняет и отвечает тем же надгробием.

delete/api/v1/chat/conversations/{id}/messages/{messageId}

Request

  • Base URL
    https://erp.akeda.ru
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://erp.akeda.ru/oauth2/authorize
      Token URLhttps://erp.akeda.ru/oauth2/token
      Scopesakeda:delegate

Path parameters

id, string uuid required
messageId, string uuid required

Headers

X-Tenant, string required

Slug выбранного кабинета; кабинет не является юрлицом

Response

Сообщение-надгробие

ChatForwardedMessage required
id, string uuid required
conversation_id, string uuid required
seq, integer required
sender_user_id, integer nullable required
kind, 'text' | 'system' | 'application' | 'file' required
body, string required
reply_to_message_id, string uuid nullable required
forwarded_from_message_id, string uuid nullable required
forwarded_from_user_id, integer
forwarded_from_name, string
mentions, ChatMessageMention[] required
reactions, ChatMessageReaction[] required
client_message_id, string uuid nullable required
created_at, string date-time required
edited_at, string date-time nullable required
deleted_at, string date-time nullable required

Надгробие: сообщение удалено у всех

attachments, ChatForwardedAttachment[] required

Example response

{
  "attachments": [
    {
      "content_url": "/api/v1/chat/attachments/00000000-0000-0000-0000-000000000001/content"
    }
  ]
}

Changes

    • info

      added the optional property attachments/items/image_height to the response with the status

    • info

      added the optional property attachments/items/image_width to the response with the status

    • info

      endpoint added