Skip to content

feat(chat): add file attachments to sendMessage gRPC#1541

Merged
kkopanidis merged 1 commit into
v0.16.xfrom
feat/chat-grpc-sendmessage-files
Jul 7, 2026
Merged

feat(chat): add file attachments to sendMessage gRPC#1541
kkopanidis merged 1 commit into
v0.16.xfrom
feat/chat-grpc-sendmessage-files

Conversation

@ChrisPdgn

@ChrisPdgn ChrisPdgn commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Adds storage file ID support to the chat module sendMessage gRPC API so trusted server-side callers can send file and multimedia messages with the same semantics as socket messages.

  • Extend SendMessageRequest in chat.proto with repeated string files = 6
  • Validate file / multimedia messages require at least one file ID
  • Persist and broadcast files only when file IDs are present
  • Keep existing text/system callers backward compatible

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Regenerated chat/grpc-sdk proto types locally (pnpm --filter @conduitplatform/chat run generateTypes, pnpm --filter @conduitplatform/grpc-sdk run protoc)
  • Verified Chat.ts has no new linter issues

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain: Node.js, pnpm, protoc/ts-proto
  • SDK: @conduitplatform/grpc-sdk on v0.16.x

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Allow module-to-module chat sends to pass storage file IDs through sendMessage,
with validation and socket broadcast parity for file and multimedia messages.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ChrisPdgn
ChrisPdgn changed the base branch from main to v0.16.x July 7, 2026 10:10
Comment thread modules/chat/src/Chat.ts
});
}

if (isFileMessage && !Array.isArray(requestFiles)) {

@ioanniskemerlis ioanniskemerlis Jul 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this array check is a little bit redundant. requestFiles is always an array since you normalize it with const requestFiles = files ?? []; , and files are always an array or missing from protobuff

other than this minor thing (doesnt hurt, but this if clause wont ever run), I think this is good to go, I will approve either way

@kkopanidis
kkopanidis merged commit b9db30e into v0.16.x Jul 7, 2026
6 of 7 checks passed
@kkopanidis
kkopanidis deleted the feat/chat-grpc-sendmessage-files branch July 7, 2026 14:22
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.

3 participants