-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Streamlabs] Unexpected "amount" format on Youtube Superchat #10
Comments
This is actually a localization problem. Let me expand: The amount field probably mapped to a decimal field which happens to be defaulted by various dbms as decimal(19,6) which means 19 figures before decimal point, 6 figures after. So your 2$ value is recorded as "0000000000000000002.0000000" to the DB. We, the people in Turkiye, represent money values as "." as thousands seperator and "," as decimal seperator, but most of the world is the other way around, "." as decimal point and "," as thousands seperator. So that generates a confusion and requires serious attention by programmers. Why? If you write code to "." being decimal point and have "2$" stored "2.000000" respectively and host in Turkiye, then what you get back is "2.000.000". Notify them to check their "string to decimal" and "decimal to string" conversions to be based upon "Invariant Culture". |
Thanks for that beautifully written explanation @hasanmanzak! 🎉 Precision and localization concerns seem to be the cause of that as you mentioned. Anyways currently the TSL matching a ...
ON Youtube Superchat
WITH amount = 2000000 The amount looks confusing to the user, because it is way different than the other TSL Predicates. |
Describe the bug
Streamlabs Socket API sends Youtube Superchat event with the amount multiplied with 1_000_000 (?)
To Reproduce
messages
array and findamount
fieldExpected behavior
The donation value in human-readable format, just like on other events.
Version (please complete the following information):
Additional context
This is an inconsistency (?) that can only be fixed by Streamlabs Socket API developers. Contact them and report this inconsistency.
The text was updated successfully, but these errors were encountered: