Skip to content

[GOWS] - Messages sent via POST /api/sendFile not returned by GET messages API #1998

@niels-przybilla

Description

@niels-przybilla

Messages sent via POST /api/sendFile (document/file messages) are successfully delivered to the recipient (201 response, message.ack confirmed via webhook), but they do not appear in the GET /api/{session}/chats/{chatId}/messages response afterwards.

Messages sent via POST /api/sendImage to the same chat do appear correctly in the messages API.

Version

{
"version": "2026.3.1",
"engine": "GOWS",
"tier": "PLUS",
"platform": "linux/x64"
}

Steps

To Reproduce:

  1. Send a document via POST /api/sendFile:
    {
    "session": "my-session",
    "chatId": "201992580407535@lid",
    "file": {
    "mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "filename": "RawMaterialSheet.xlsx",
    "data": ""
    },
    "caption": "Testing Raw Material Sheet Message"
    }
  2. Receive 201 Created with valid message ID
  3. Confirm delivery via message.ack webhook
  4. Fetch messages: GET /api/my-session/chats/{chatId}/messages?limit=50&downloadMedia=true
  5. The file message is missing from the response

Comparison: POST /api/sendImage to the same chat — image does appear in messages API.

Expected behavior

File messages sent via /api/sendFile should appear in the messages API response, same as image messages from /api/sendImage.

Requests - Responses

  • POST /api/sendFile → 201 Created, ID: true_201992580407535@lid_3EB0D265DBEDAF2D51BEB7
  • GET messages?limit=50 → 50 messages returned, sent file not present
  • WebSocket message.any + message.ack both received for the file ✓

Additional context

  • Engine: GOWS
  • Tested with .xlsx, .pdf, .docx — none appear in messages API
  • _data.Message key shows documentWithCaptionMessage type
  • Chat ID format: @lid (LID-based addressing)
  • May be specific to GOWS engine's message persistence for document-type messages

patron:PRO

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions