slackapi / node-slack-interactive-messages

Slack Buttons, Menus, and Dialogs made simpler for Node
MIT License
133 stars 41 forks source link

#64 Fix response Content-Type header. #65

Closed yukimochi closed 6 years ago

yukimochi commented 6 years ago

Summary

Fix #64 . Response message should has header {"Content-Type":"application/json"}, if it is message object. Now always message is sent with {"Content-Type":"text/html"}, so slack server treat them text message. Thus, when response message object, show serialized json string in screen.

Requirements (place an x in each [ ])

codecov[bot] commented 6 years ago

Codecov Report

Merging #65 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
+ Coverage   99.08%   99.09%   +<.01%     
==========================================
  Files           3        3              
  Lines         219      220       +1     
==========================================
+ Hits          217      218       +1     
  Misses          2        2
Impacted Files Coverage Δ
src/http-handler.js 98.36% <100%> (+0.02%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8b34f56...b77bb17. Read the comment docs.

aoberoi commented 6 years ago

this looks great! thank you for catching this problem and providing a solution. my only concern is that our tests should verify this behavior, too. seeing as how the existing tests passed with acceptable coverage, i will merge as-is. i'll open another PR to make the tests more complete.