Closed skylinezum closed 8 years ago
@skylinezum hey, it seems tests are failing, can you please check why? I don't see anything useful in travis message.
Hi @stojanovic I asked @gojko and he said that jasmine reporter is updated, so I will update from master and try to get the reporter to show..
Thanks @skylinezum :)
@skylinezum just one additional, did you try this out locally, on all three types of messages?
@skylinezum could you also add a test for the case you added?
To keep the response structure consistent with the other bots, I propose that instead of packing method and other properties together, we allow the users to reply with an object including method and body, so if the response is a string we do special processing, but if the response is an object, we just use the body subkey, instead of copying and filtering the method parameter to get the body
@gojko Yea, I think having a separate method key and body key makes sense. I'll make changes when I get the chance. @stojanovic Ok I'll put a blank text key and keep them the same. I'll also add tests. I've tested it for what I'm using, but when I have time I'll make the tests better. Thanks for the feedback.
@skylinezum hey, I'll close this PR because this will be on NPM later today. Here's what I did:
{ text: 'something', parse_mode: 'Markdown' }
it'll send that custom message via the same method, it'll add chat id automatically if you don't pass it{ method: 'sendMessage', body: { text: '...' } }
it'll overwrite the method and apply the same for body as in case 2.Hope that works :)
Yea, that works. Thanks!