-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(messages): Allow Custom Fields in Messages #32224
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
…-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
customFields
to 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