Skip to content

feat(message): document and test attachments and previews on message update - #908

Draft
symphony-enrico wants to merge 1 commit into
finos:mainfrom
symphony-enrico:feat/update-message-attachments
Draft

symphony-enrico wants to merge 1 commit into
finos:mainfrom
symphony-enrico:feat/update-message-attachments

Conversation

@symphony-enrico

Copy link
Copy Markdown
Contributor

Description

Clarifies and validates support for file attachments and previews when updating existing messages via MessageService and OboMessageService.

While MessageService.update(...) has forwarded attachments and previews through getForm(Message) since SBE v24.1, the javadocs previously stated that attachments were not yet supported, and no automated tests or documentation examples verified the functionality.

Key changes:

  • MessageService.java & OboMessageService.java:
    • Updated javadoc on both update(...) overloads to clarify that attachments and previews are supported only starting from SBE v24.1.
  • MessageServiceTest.java:
    • Added captureUpdateFormParams test helper to inspect multipart form parts and headers dispatched to the API client.
    • Added tests for updating with a single attachment and preview (verifying filenames and content types).
    • Added tests for updating with multiple attachments.
    • Added tests for text-only updates (verifying no attachment or preview parts are sent).
    • Added tests for OBO message updates with attachments (verifying delegated session token headers).
  • docs/message.md:
    • Added an "Update a message with an attachment" snippet under "How to use" with an SBE v24.1 version note.
  • OpenSpec:
    • Synced capability delta spec to openspec/specs/message-update-attachments/spec.md.
    • Archived change under openspec/changes/archive/2026-10-06-update-message-attachments/.

Dependencies

None.

Checklist

  • Referenced an issue in the PR title or description
  • Filled properly the description and dependencies, if any
  • Unit/Integration tests updated or added
  • Javadoc added or updated
  • Updated the documentation in docs folder

…update

- Update javadoc in MessageService and OboMessageService indicating attachments and previews are supported only starting from SBE v24.1
- Add unit tests in MessageServiceTest verifying update requests with single attachment + preview, multiple attachments, text-only, and OBO
- Add documentation and code snippet in docs/message.md
- Archive OpenSpec change update-message-attachments and sync delta specs to main specs

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant