-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The /api/v1/rooms.media endpoint only uploads files to storage but doesn't create messages in
rooms. This makes it impossible to send media with captions as a single message. Meanwhile,
rooms.upload is marked as deprecated but is the only endpoint that actually works correctly.
The Problem
RocketChat is deprecating rooms.upload in favor of rooms.media, BUT:
- rooms.media: Only uploads file to database, returns URL, does NOT create a message in the room
- rooms.upload: Creates proper message with file + caption (but marked as deprecated)
Current Broken Behavior with rooms.media
curl --request POST \
--url http://localhost:3000/api/v1/rooms.media/ROOM_ID \
--form [email protected] \
--form msg="This caption is completely ignored"
Result:
- ✅ File uploaded to database
- ✅ Returns file URL
- ❌ NO message created in room
- ❌ Caption completely ignored
- ❌ Room shows nothing
Expected Behavior
The "new" rooms.media endpoint should:
- Upload the file
- Create a message in the specified room
- Include the caption from msg parameter
- Show the media with caption as a single message
Why This Is Critical
- You're deprecating the ONLY working endpoint (rooms.upload)
- The "replacement" endpoint (rooms.media) is broken/incomplete
- All integrations using file uploads with captions will break
- There's no working alternative
Test Results Proving the Issue
rooms.media - BROKEN (ignores msg, doesn't create message):
{
"file": {
"_id": "68b821adc9d07159776790ba",
"url": "/file-upload/68b821adc9d07159776790ba/icon.png"
},
"success": true
}
Room shows: NOTHING
rooms.upload - WORKS (but deprecated):
{
"message": {
"_id": "zbgZpQDRKvaY9nFu3",
"msg": "Test caption with media",
"file": {...},
"attachments": [...]
},
"success": true
}
Room shows: Message with media and caption
The Ask
Either:
- Fix rooms.media to actually create messages with captions like rooms.upload does
- Stop deprecating rooms.upload until rooms.media has feature parity
- Add a new parameter to rooms.media like createMessage=true to make it create messages
Metadata
Metadata
Assignees
Labels
No labels