feat(messages): Allow Custom Fields in Messages#32224
feat(messages): Allow Custom Fields in Messages#32224kodiakhq[bot] merged 19 commits intodevelopfrom
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: f4b2297 The changes in this PR will be included in the next version bump. This PR includes changesets to release 34 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #32224 +/- ##
===========================================
+ Coverage 55.31% 55.35% +0.03%
===========================================
Files 2319 2323 +4
Lines 51201 51255 +54
Branches 10473 10485 +12
===========================================
+ Hits 28323 28370 +47
+ Misses 20367 20366 -1
- Partials 2511 2519 +8
Flags with carried forward coverage won't be shown. Click here to find out more. |
f519ca8 to
4e04dee
Compare
4e04dee to
0fe295c
Compare
apps/meteor/tests/unit/app/lib/server/lib/validateCustomMessageFields.tests.ts
Show resolved
Hide resolved
MarcosSpessatto
left a comment
There was a problem hiding this comment.
Let's add this new optional parameter here as well: https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rest-typings/src/v1/chat.ts#L15
Also, should we add that feature on message editing too?
…-fields' into feat/message-custom-fields
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
…-fields' into feat/message-custom-fields
Proposed changes (including videos or screenshots)
Add two new settings to control the custom fields in the messages' object:
Message_CustomFields_Enabled: Boolean, default falseMessage_CustomFields: String/Code/JSON, an AJV schema validatorIt allows a new property named
customFieldsto be sent via message APIs. When enabled it will be validated based on the AJV schema defined.The backend will force the schema type to "object" and prevent extra properties by forcing "additionalProperties" as false.
Issue(s)
CORE-274
Steps to test or reproduce
cURL for testing
Further comments
TODO