Skip to content

feat(conversationfolder): use per share conversation folders#17346

Merged
miaulalala merged 2 commits intomainfrom
feat/4340/lazy-conversation-subfolders
Apr 8, 2026
Merged

feat(conversationfolder): use per share conversation folders#17346
miaulalala merged 2 commits intomainfrom
feat/4340/lazy-conversation-subfolders

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

@miaulalala miaulalala commented Mar 12, 2026

☑️ Resolves

🛠️ API Checklist

🚧 Tasks

  • ...

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@miaulalala miaulalala added this to the 🏖️ Next Major (34) milestone Mar 12, 2026
@miaulalala miaulalala self-assigned this Mar 12, 2026
@miaulalala miaulalala added the feature: chat 💬 Chat and system messages label Mar 12, 2026
@miaulalala miaulalala marked this pull request as ready for review March 20, 2026 08:21
@nickvergessen nickvergessen marked this pull request as draft March 20, 2026 10:24
@nickvergessen nickvergessen marked this pull request as ready for review March 20, 2026 10:25
Comment thread lib/Controller/FilesIntegrationController.php Outdated
Comment thread lib/Controller/FilesIntegrationController.php Outdated
Comment thread lib/Controller/FilesIntegrationController.php Outdated
Comment thread lib/Chat/Parser/SystemMessage.php Outdated
Comment thread lib/Chat/Parser/SystemMessage.php
Comment thread lib/Chat/Parser/SystemMessage.php Outdated
Comment thread lib/Listener/ConversationFolderListener.php Outdated
Comment thread lib/Listener/ConversationFolderListener.php Outdated
Comment thread lib/Listener/ConversationFolderListener.php Outdated
Comment thread lib/Share/RoomShareProvider.php Outdated
Comment thread lib/AppInfo/Application.php Outdated
Comment thread lib/Service/ConversationFolderService.php Outdated
Comment thread lib/Controller/FilesIntegrationController.php Outdated
Comment thread lib/Listener/ConversationFolderListener.php Outdated
@miaulalala miaulalala force-pushed the feat/4340/lazy-conversation-subfolders branch from 9f13642 to 270f200 Compare March 25, 2026 18:17
@mosi-kha
Copy link
Copy Markdown

Hi
Thanks for this useful feature
I have a question: if the room name changes, will the folder name update too?

@miaulalala
Copy link
Copy Markdown
Contributor Author

miaulalala commented Mar 26, 2026

Hi Thanks for this useful feature I have a question: if the room name changes, will the folder name update too?

no not for now as that is quite a heavy process (depending on the number of users). But the old folder will still be accessible and all shares will stay as is in the chat, even if the conversation is renamed.

Comment thread lib/Chat/SystemMessage/Listener.php Outdated
Comment thread lib/Controller/ChatController.php
Comment thread lib/Exceptions/StorageQuotaExceededException.php Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check in the other sharing tests how to list folders and shares for users (e.g. https://github.com/nextcloud/spreed/pull/17483/changes) and add a the checks here to ensure the shares are stored with correct information for the actor and recipients

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This here is also still missing, but we can do it in a follow up as well.

Comment thread lib/Share/Listener.php
Comment thread lib/Share/Listener.php Outdated
Comment thread lib/Config.php Outdated
Comment thread src/stores/upload.ts
Comment thread tests/integration/features/bootstrap/SharingContext.php Outdated
Comment thread tests/integration/features/bootstrap/SharingContext.php
@miaulalala miaulalala force-pushed the feat/4340/lazy-conversation-subfolders branch 2 times, most recently from 649496a to 2e1f1ce Compare March 30, 2026 10:28
@miaulalala miaulalala added the feature: api 🛠️ OCS API for conversations, chats and participants label Mar 30, 2026
Comment thread lib/Chat/SystemMessage/Listener.php Outdated
Comment thread lib/Service/ConversationFolderService.php Outdated
Comment thread lib/Chat/SystemMessage/Listener.php
Comment thread lib/Controller/ChatController.php Outdated
@miaulalala miaulalala requested a review from nickvergessen April 1, 2026 10:39
Comment thread lib/Service/ConversationFolderService.php Outdated
@miaulalala miaulalala force-pushed the feat/4340/lazy-conversation-subfolders branch 2 times, most recently from 23a7a8d to 7477c1c Compare April 1, 2026 12:46
Comment thread lib/Capabilities.php
@miaulalala miaulalala force-pushed the feat/4340/lazy-conversation-subfolders branch from 7477c1c to f410dae Compare April 2, 2026 07:35
Comment thread lib/Config.php Outdated
Comment thread lib/Config.php
Comment thread lib/Share/Listener.php
Comment thread src/types/openapi/openapi-federation.ts
@miaulalala miaulalala requested a review from nickvergessen April 2, 2026 14:41
Comment thread tests/integration/features/sharing-1/conversation-folder.feature
Copy link
Copy Markdown
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you need to resolve fixups anyway, lets simplify the boolean logic as well.

Comment thread lib/Service/ConversationFolderService.php Outdated
@miaulalala miaulalala force-pushed the feat/4340/lazy-conversation-subfolders branch 2 times, most recently from aa43380 to 11ae154 Compare April 8, 2026 08:34
Introduces a per-share conversation subfolder scheme for Talk
attachments. Instead of a single flat attachment folder, files are
organised as:

  Talk/<ConversationName>-<token>/<DisplayName>-<uid>/

A new POST /api/v1/chat/{token}/attachment endpoint accepts a file
path already inside the caller's conversation subfolder, creates a
folder-level TYPE_ROOM share (via ConversationFolderService) to give
all room members access, and posts the file_shared chat message.

The attachment folder root is configurable per user; the feature is
toggled via the `conversation_subfolders` app config key (default on)
and advertised through the existing capabilities mechanism.

AI-assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
…tion subfolder feature

Covers ConversationFolderService (quota, share deduplication, rename-on-conflict),
Share/Listener mount point resolution (flat, nested group/1-1 rooms, room-not-found
fallback), SystemMessage parser for the fileId path, ChatController attachment
endpoint, and the full sharing-1/conversation-folder integration suite.

AI-assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala force-pushed the feat/4340/lazy-conversation-subfolders branch from 11ae154 to fab2466 Compare April 8, 2026 08:34
@miaulalala miaulalala merged commit 3e56ca3 into main Apr 8, 2026
79 checks passed
@miaulalala miaulalala deleted the feat/4340/lazy-conversation-subfolders branch April 8, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: api 🛠️ OCS API for conversations, chats and participants feature: chat 💬 Chat and system messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📂 Use subfolder for Talk attachments, one per conversation

3 participants