Skip to content

Releases: Yoctol/bottender

0.14.23 / 2018-02-27

27 Feb 04:22
Compare
Choose a tag to compare
  • [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

12 Feb 08:57
Compare
Choose a tag to compare
  • [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

05 Feb 15:41
Compare
Choose a tag to compare
  • [new] Support all of methods on ConsoleContext with fallbackMethods: 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"}]]
  • [fix] Catch write session error in async mode #185
  • [improve] Show warning when calling setState or resetState after session have been written #186

0.14.20 / 2018-01-30

30 Jan 12:00
Compare
Choose a tag to compare
  • [fix] Use sync mode in ConsoleBot to fix some format issue.

0.14.19 / 2018-01-25

25 Jan 06:43
Compare
Choose a tag to compare
  • [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

18 Jan 11:20
Compare
Choose a tag to compare
  • [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

17 Jan 11:47
Compare
Choose a tag to compare
  • [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

16 Jan 08:15
Compare
Choose a tag to compare

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

12 Jan 10:44
Compare
Choose a tag to compare

slack

  • [new] Add context.postEphemeral:
context.postEphemeral({ text: 'hello' });
  • [fix] Reply to thread instead of channel when receiving events in thread #145

telegram

  • [fix] Use message.chat.id to reply #148

0.14.14 / 2018-01-08

08 Jan 04:45
Compare
Choose a tag to compare
  • [fix] Improve error handling in express middleware #142