Files and Photos in Federated Chat
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 586
- Avg merge
- 18h 27m
- Merged PRs (30d)
- 333
Description
Summary
Enable users in federated Talk conversations to share files and photos across Nextcloud instances with the same experience they have in local (non-federated) conversations.
Motivation / Problem Statement
Nextcloud Talk federation allows users on different instances to communicate in shared rooms. However, sharing files or photos in these conversations is currently not supported. This is a significant gap: file sharing is one of the most-used features in Talk, and its absence in federated rooms makes federation substantially less useful for real collaboration.
Proposed Behavior
| Action | Expected result |
|---|---|
| User A (Instance A) shares a file in a federated room | User B (Instance B) receives a message with a file attachment card |
| User B clicks the file | The file opens via a cross-instance share link (OCM or direct share URL) |
| User A shares a photo/image | User B sees an inline image preview |
| File is deleted or share revoked on Instance A | The link degrades gracefully (404 / revoked state shown) |
| User B downloads the file | Download goes via Instance A's share endpoint; no file copy stored on Instance B |
Technical Scope
-
Sending side — when a file message is sent in a federated room, the sender's instance must:
- Create a public or user-scoped share for the file (or reuse an existing one)
- Attach the share token / OCM resource URL to the chat message payload sent to the remote instance(s)
-
Receiving side — the receiving instance must:
- Parse the file attachment metadata from the federated message
- Render a file card in the chat UI (name, size, icon / thumbnail)
- Fetch a preview/thumbnail via an OCS proxy or the sender's public thumbnail endpoint
-
Preview / thumbnail handling
- Inline images: fetch thumbnail from sender's instance via the public share preview endpoint
- Non-image files: show file icon + metadata (size, mime type)
-
Access control
- The share created for the file must be at minimum "view" scoped
- Optional: password protection, expiry — should not break the federated message card
-
Message format / protocol
- Extend the federated message schema to carry a
fileobject:{ name, size, mimeType, previewUrl, downloadUrl } - Must be backwards-compatible (older instances ignore unknown fields)
- Extend the federated message schema to carry a
-
UI components (Vue/Talk frontend)
- Message renderer: handle
filemessage type in federated context - Distinguish between local-share cards and federated-share cards where behavior differs
- Message renderer: handle
Out of Scope (for this issue)
- Editing/renaming files from the receiving instance
- Uploading files from the receiving side (separate issue)
- Video/audio attachments (can follow same pattern but needs separate review)
- End-to-end encryption for federated file transfers
Acceptance Criteria
- A user in a federated room can share a file from their Nextcloud and the remote participant sees a file card
- Images shared inline show a rendered preview on the remote instance
- Clicking a file card on the remote instance opens/downloads the file via the originating instance's share URL
- If the share is revoked, the card shows a clear "no longer available" state
- No file data is copied or stored on the receiving instance
- Backwards compatible: remote instances on older Talk versions degrade gracefully
- Unit + integration tests cover the new message type serialization/deserialization
- E2E test: two local Talk instances share a file in a federated room
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the federated message schema and the Talk message renderer, then trace how file metadata and local-share cards are serialized and displayed. Use the planned unit and integration tests for message serialization/deserialization as the first test targets, and add an end-to-end test with two local Talk instances; done means federated files and images render, open through the originating instance, degrade after revocation, and remain backward-compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend, distributed-systems, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100