Skip to content
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

[Fix] Store Outgoing Integration Result as String in Mongo #8413

Merged
merged 3 commits into from
Nov 7, 2017

Conversation

cpitman
Copy link
Contributor

@cpitman cpitman commented Oct 5, 2017

@RocketChat/core

Closes #7305

Outgoing webhooks were failing if the response from the other side was JSON with keys that are vaild json but not valid mongo keys (ie include . or $). The result is only used for display, and is always converted to a string before display.

This change does the string conversion before storing in Mongo, then makes the client side check if the value is already a string or JSON that needs to be stringified.

Tested the fixes locally, here is a screenshot of a history result that failed previously:

image

Http Results can include keps which are vaild JSON but invalid mongo
keys. Store them as a string, then check when formatting them for
dispkay if they are json that needs to be stringifies or already a
string.
@CLAassistant
Copy link

CLAassistant commented Oct 5, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@graywolf336 graywolf336 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the addition and fix!

@rodrigok rodrigok merged commit 5bc2be7 into RocketChat:develop Nov 7, 2017
@rodrigok rodrigok added this to the 0.60.0 milestone Nov 7, 2017
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.

Outgoing Webhook fails due to dotted field names in response
4 participants