happybara-io / WorkflowBuddy

The missing pieces of Slack Workflow Builder.
GNU Affero General Public License v3.0
28 stars 4 forks source link

Invalid JSON because of curly quotes #28

Closed jphorn closed 1 year ago

jphorn commented 1 year ago

Past Issues Searched

Issue is a Bug Report

Describe the bug

I keep getting Invalid JSON for the Outgoing Webhook step because Slack's stupid form inputs insists on mangling the quotes as curly quotes. Is there something to prevent this on your end?

https://share.cleanshot.com/kN4CNN

Expected behavior

No curly quotes for json inputs

Screenshots

https://share.cleanshot.com/kN4CNN+

Environment

- OS: macOS 12.6
- Slack Client: macOS 4.29.141
11e6574970e522d05bed5fb51aefa9d3ca8abec0@1665605847 (Beta)
I-Dont-Remember commented 1 year ago

Ah, that is frustrating! I can definitely start looking for a fix, we have at least one Mac user I can get to test. Also thank you for reporting! I've done all my testing on Windows clients, but of course there's differences ๐Ÿ™„ .

As a temporary workaround:

Potential solution

jphorn commented 1 year ago

Ah, that is frustrating! Can definitely start looking for a fix, we have at least one Mac user I can get to test. Also thank you for reporting! I've done all my testing on Windows clients, but of course there's differences ๐Ÿ™„ .

As a temporary workaround:

  • Is it possible to copy "good" quotes and paste them? Like is Slack converting them just when typed from a keyboard, or does it replace from any way they get added?

Unfortunately not :-( I've tried that with my code editor (Nova by Panic and Macromates' Textmate), but it's just converting them as curly. Doesn't matter if I just copy/paste a single selected quote or the complete json command.

You don't see the same behaviour on Slack/Windows? So it's likely not a general Slack thing?

I-Dont-Remember commented 1 year ago

๐Ÿ‘‹ Sorry it auto-close this when I merged my PR - i tested it with:

{โ€œdqโ€:โ€œDouble quoteโ€}

Yeah haven't seen that issue with the Windows client unfortunately.

They seemed like the smart quotes that might be used on Mac. If this didn't fix it, if you could copy paste into your comment the offending characters so I can write tests against them, would be much appreciated.

jphorn commented 1 year ago

Thanks! Will keep you updated after you closed #30 since I have no clue how to deploy your fixes to my Fly instance ๐Ÿ˜œ

I-Dont-Remember commented 1 year ago

Lmk if this makes sense! Updating for Fly.

โš  one unique thing in your case, since I updated the Fly deployment instructions - you'll want to create a fly volume using the provided commands so your event configuration's persist in between deployments.

jphorn commented 1 year ago

Fixed in https://github.com/happybara-io/WorkflowBuddy/commit/0e0af51babe3dfe386063d7767178c1b0f35178a.