Skip to content

content_type-specific validation on the file-message send path #335

Description

@codebestia

lib/validateMessagePayload.ts is the shared validator used by the REST send path and the main send_message socket handler. send_file_message has its own inline, weaker checks and never calls the shared validator, so file messages skip the envelope-presence rule entirely.

Acceptance criteria:

  • send_file_message calls the same validateMessagePayload the other send paths use
  • Land this together with the envelope-migration issue — the file-type rule requires envelopes and send_file_message doesn't create any yet in isolation
  • lib/validateMessagePayload.ts remains the single source of truth for send-payload validity, referenced by every send path

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions