Releases: Yoctol/bottender
Releases · Yoctol/bottender
0.14.23 / 2018-02-27
- [fix] fix context simulator initialState (#198)
messenger
- [new] Support request thread control:
context.requestThreadControl();
context.event.isRequestThreadControl; // true or false
context.event.requestThreadControl;
/*
{
metadata: 'additional content that the caller wants to set',
requested_owner_app_id: '123456789',
}
*/
- [fix] fix error on verifying facebook signature.
0.14.22 / 2018-02-12
- [deps] bump messaging-apis to v0.6.13
console
- [new] Support trigger payload in
ConsoleBot
You > /payload PAYLOAD
Receive event:
context.event.isMessage; // false
context.event.message; // null
context.event.isText; // false
context.event.text; // null
context.event.isPayload; // true
context.event.payload; // PAYLOAD
0.14.21 / 2018-02-05
- [new] Support all of methods on
ConsoleContext
withfallbackMethods: true
#184, for example:
const bot = new ConsoleBot({ fallbackMethods: true });
bot.onEvent(async context => {
await context.sendText('Hello World');
await context.sendImage('https://example.com/vr.jpg');
await context.sendButtonTemplate('What do you want to do next?', [
{
type: 'web_url',
url: 'https://petersapparel.parseapp.com',
title: 'Show Website',
},
{
type: 'postback',
title: 'Start Chatting',
payload: 'USER_DEFINED_PAYLOAD',
},
]);
});
Result:
Bot > Hello World
Bot > sendImage: ["https://example.com/vr.jpg"]
Bot > sendButtonTemplate: ["What do you want to do next?",[{"type":"web_url","url":"https://petersapparel.parseapp.com","title":"Show Website"},{"type":"postback","title":"Start Chatting","payload":"USER_DEFINED_PAYLOAD"}]]
0.14.20 / 2018-01-30
- [fix] Use sync mode in
ConsoleBot
to fix some format issue.
0.14.19 / 2018-01-25
- [new] Support
--ngrok-port
when setting webhook #171. For example:
bottender messenger webhook set --ngrok-port 1234
bottender telegram webhook set --ngrok-port 1234
bottender viber webhook set --ngrok-port 1234
- [deps] Update part of dependencies.
viber
- [new] Implement signature verify for viber
0.14.18 / 2018-01-18
- [fix] Prevent applying any mutations to
initialState
#164
telegram
- [new] Added
context.answerInlineQuery
for Telegram #165:
context.answerInlineQuery(
[
{
type: 'photo',
id: 'UNIQUE_ID',
photo_file_id: 'FILE_ID',
title: 'PHOTO_TITLE',
},
{
type: 'audio',
id: 'UNIQUE_ID',
audio_file_id: 'FILE_ID',
caption: 'AUDIO_TITLE',
},
],
{
cache_time: 1000,
}
);
0.14.17 / 2018-01-17
- [changed] Improve config schema validation.
slack
- [experimental] add Slack RTM API support:
const { SlackBot } = require('bottender');
const bot = new SlackBot({
accessToken: '__FILL_YOUR_TOKEN_HERE__',
});
bot.onEvent(async context => {
await context.sendText('Hello World');
});
bot.createRtmRuntime();
telegram
- [new] Handle all of telegram event types includes:
message
edited_message
channel_post
edited_channel_post
inline_query
chosen_inline_result
callback_query
shipping_query
pre_checkout_query
- [new] Support group chat events.
0.14.16 / 2018-01-16
messenger
- [new] Better handle Messenger getUserProfile failure #155
If getUserProfile
throw error, session.user
will fallback to have only id
and _updatedAt
keys.
telegram
- [new] Added more event parser and getter to telegram event #150
event.isEditedMessage
event.editedMessage
event.isChannelPost
event.channelPost
event.isEditedChannelPost
event.editedChannelPost
event.isInlineQuery
event.inlineQuery
event.isChosenInlineResult
event.chosenInlineResult
event.isShippingQuery
event.shippingQuery
event.isPreCheckoutQuery
event.preCheckoutQuery
0.14.15 / 2018-01-12
0.14.14 / 2018-01-08
- [fix] Improve error handling in express middleware #142