play-co / hookbox

HookBox is a Comet server and message queue that tightly integrates with your existing web application via web hooks and a REST interface.
http://hookbox.org
MIT License
284 stars 23 forks source link

Hosted Hookbox, mangling Payload Objects sent to Webhook #50

Closed Xorlev closed 14 years ago

Xorlev commented 14 years ago

It seems that the Hosted Hookbox parses the JSON from the payload, but then returns a print of the parsed JSON.

It's currently passing this to my callback: {u'data': u'MyMessage', u'type': u'message'}

The u'data' is clearly indicative of a dict being printed out rather than having json.dumps() called on it.

hamax commented 14 years ago

I think I've found the problem: hookbox/channel.py line 167 The payload used in the frame is not json (it's result from json.loads), the original parameter payload should be used instead. payload = encoded_payload overwrites it

MSch commented 14 years ago

I would really love to have that fixed. It seems really easy.

MSch commented 14 years ago

Have a fix commited: http://github.com/msch/hookbox

mcarter commented 14 years ago

Pulled into mcarter/hookbox, Thanks! NOTE: this is not deployed on hosted hookbox yet.