Conversation
Add field to indicate whether the oauth service is customized and change the file
|
Thank you @MarcosSpessatto! 👊 |
There was a problem hiding this comment.
Can you explain why you're using Boolean(service.custom) here when we don't use it anywhere else?
There was a problem hiding this comment.
@graywolf336 to convert to Boolean if it is some value considered false by JS.
There was a problem hiding this comment.
@MarcosSpessatto Please reconsider another way, because if the string is "false" then it will result in a value of true: https://stackoverflow.com/a/264037
There was a problem hiding this comment.
Okay, I'm going to change the validation, but I don't agree that the string 'false' should be considered Boolean, IMHO 'false' is a string and not a boolean, just as 'true' should be considered a string and not a boolean. So in both cases, casting a Boolean must be true. Why should I consider the string 'false'?
There was a problem hiding this comment.
You misunderstood what I was saying. If the value of service.custom is a string and the value is 'false' then doing Boolean(service.custom) will result in true being the value instead of the expected false.
There was a problem hiding this comment.
The question was, why store in the database a Boolean value as a string and not as Boolean, if you expect it to be Boolean, but @graywolf336 already explained that to me. Thanks.
change comparision with boolean
Add missing fields when oauth service is custom
|
Is this one good to go guys? |
…-api-chat-postmessage-validations * commit 'a9fb4da5c847a456990a5d60369f0f52ff4a8bd8': (137 commits) Remove "secret" from REST endpoint /settings.oauth response [FIX] Directory sort and column sizes were wrong (#10403) [FIX] Add oauth services missing fields, and indicate whether the oauth service is customized (#10299) Show error message when email verification fails (#10446) Correct the column positions in the directory search for users (#10454) Fixed custom fields misalignment in registration form (#10463) [FIX] Unique identifier file not really being unique (#10341) [OTHER] More Listeners for Apps & Utilize Promises inside Apps (#10335) [FIX] Empty panel after changing a user's username (#10404) [FIX] Russian translation of "False" (#10418) [FIX] Links being embedded inside of blockquotes (#10496) [FIX] The 'channel.messages' REST API Endpoint error (#10485) [OTHER] Develop sync (#10487) [FIX] Button on user info contextual bar scrolling with the content (#10358) [FIX] "Idle Time Limit" using milliseconds instead of seconds (#9824) [NEW] Body of the payload on an incoming webhook is included on the request object (#10259) [FIX] Missing i18n translation key for "Unread" (#10387) [FIX] Owner unable to delete channel or group from APIs (#9729) [NEW] REST endpoint to recover forgotten password (#10371) Add REST endpoint chat.reportMessage, to report a message (#10354) ...

Add oauth services missing fields and add field to indicate whether the oauth service is customized.
Closes #10298
Closes #10332
@rafaelks , @filipedelimabrito, @cardoso .