-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Floating point in fields is not working #14172
Copy link
Copy link
Closed
Description
Description:
Hi,
i've discovered a bug using incoming webhooks.
The bug occurs when a field with an value of type double is send. Then an error is thrown.
With wrapping the value in quotes it works, but the problem is that my system is not wrapping it. Also it works in Slack without quotes.
Steps to reproduce:
- Create incoming webhook without script
- Send message to incoming webhook with the following body
{
"attachments": [
{
"color": "#D63232",
"fallback": "[Alerting] My Alert",
"fields": [
{
"short": true,
"title": "Some value",
"value": 1.8503078660265208
}
],
"ts": 1555507262
}
],
"parse": "full"
}
- Send the same body with quotes around the numeric value of
valueand you see it working.
Expected behavior:
My alert is shown in RocketChat as expected
Actual behavior:
Then the following response will received and not message is coming up in the channel
{
"success": false,
"error": "Match error: Match error: Failed Match.OneOf, Match.Maybe or Match.Optional validation in field value"
}
Server Setup Information:
- Version of Rocket.Chat Server: 0.74.3
- Deployment Method: docker
- Number of Running Instances: 1
- MongoDB Version: 4.0.8
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels