You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Wit.message() lacks support for msg_id(issue #169) & thread_id (see docs for /message).
But adding those fields will mean passing more arguments to Wit.message() and if you only need to pass just some arguments, let's say we only need message & junk you will end with something like this:
const {Wit, log} = require('node-wit');
const client = new Wit({
accessToken: MY_TOKEN,
logger: new log.Logger(log.DEBUG) // optional
});
client.message('set an alarm tomorrow at 7am', null, null, null, false);
Also if you want to add more supported fields the argument list will only increase, because changing the order or removing old values will break apps that already uses Wit.message().
The proposal
Make Wit.message() accepts an Object as a first argument and take the values from it, since message argument must be a string, this should be easy to implement. Also only if the first argument is an Object you should take the values from it, so we don't break apps that already use Wit.message().
The text was updated successfully, but these errors were encountered:
The problem
Currently the Wit.message() lacks support for
msg_id
(issue #169) &thread_id
(see docs for /message).But adding those fields will mean passing more arguments to Wit.message() and if you only need to pass just some arguments, let's say we only need
message
&junk
you will end with something like this:Also if you want to add more supported fields the argument list will only increase, because changing the order or removing old values will break apps that already uses Wit.message().
The proposal
Make Wit.message() accepts an Object as a first argument and take the values from it, since
message
argument must be a string, this should be easy to implement. Also only if the first argument is an Object you should take the values from it, so we don't break apps that already use Wit.message().The text was updated successfully, but these errors were encountered: