Skip to content

Releases: Yoctol/bottender

1.3.4 / 2020-04-04

04 Apr 10:11
Compare
Choose a tag to compare
  • [fix] fix bottender/router import statement in TypeScript (#715)

1.3.3 / 2020-04-01

01 Apr 07:50
Compare
Choose a tag to compare

line

1.3.2 / 2020-03-20

30 Mar 16:25
Compare
Choose a tag to compare
  • [fix] improve the error message of missing entry action (#705).
  • [fix] fix responding with application/json when using custom server (#700).
  • [deps] update messaging-api-line.

create-bottender-app

  • [fix] rewrite generated README (#708).
  • [fix] install eslint-plugin-import for --typescript.
  • [fix] add dist to .gitignore for TypeScript (#697).

1.3.1 / 2020-03-16

16 Mar 10:14
Compare
Choose a tag to compare
  • [deps] some packages bump from dependabot.

line

  • [deps] update messaging-api-line to fix an issue about narrowcast.

create-bottender-app

  • [fix] hint users to edit the .env file (#678)

1.3.0 / 2020-03-06

06 Mar 04:20
Compare
Choose a tag to compare
  • [type] export types from messaging-apis (#661):
import { 
  MessengerTypes, 
  WhatsappTypes, 
  LineTypes, 
  TelegramTypes, 
  SlackTypes, 
  ViberTypes, 
} from 'bottender';
  • [deps] update dependencies.

whatsapp

// bottender.config.js

module.exports = {
  channels: {
    whatsapp: {
      enabled: true,
      path: '/webhooks/whatsapp',
      accountSid: process.env.WHATSAPP_ACCOUNT_SID,
      authToken: process.env.WHATSAPP_AUTH_TOKEN,
      phoneNumber: process.env.WHATSAPP_PHONE_NUMBER,
    },
  },
};

slack

  • [new] support Slack signing secret:
// bottender.config.js

module.exports = {
  channels: {
    slack: {
      enabled: true,
      path: '/webhooks/slack',
      accessToken: process.env.SLACK_ACCESS_TOKEN,
      signingSecret: process.env.SLACK_SIGNING_SECRET,
      // verificationToken: process.env.SLACK_VERIFICATION_TOKEN, // deprecated, use signingSecret
    },
  },
};
  • [new] add support for Slack slash commands (#166):
async function App(context) {
  if (context.event.isCommand) {
    await context.sendText(
      `I received slash command '${context.event.command}' with arguments: '${context.event.text}'`
    );
  }
}

line

  • [deps] update messaging-api-line to support narrowcast.

create-bottender-app

  • [new] use signing secret in create-bottender-app (#659).
  • [new] add TypeScript support to bottender dev (#654).

cli

  • [new] support bottender dev --inspect=HOST:PORT (#656).

1.2.3 / 2020-03-04

06 Mar 04:20
Compare
Choose a tag to compare

slack

  • [fix] fix a typo in Slack error message #671

1.2.2 / 2020-02-24

06 Mar 04:19
Compare
Choose a tag to compare

create-bottender-app

  • [fix] Fixed wrong npm scripts in the instruction.

1.2.1 / 2020-02-13

13 Feb 10:10
Compare
Choose a tag to compare
  • [fix] install @types packages in package dependencies instead of workspace.

1.2.0 / 2020-01-22

22 Jan 06:33
Compare
Choose a tag to compare
context.intent; // null

context.setIntent('greeting');

context.intent; // 'greeting'
  • [new] Added context.setAsHandled() and context.setAsNotHandled() for tracking handling status (#624):
context.setAsHandled();

context.isHandled; // true

context.setAsNotHandled();

context.isHandled; // false
  • [new] Added getSessionStore helper function to get the session store that configured by bottender.config.js (#633):
const { getSessionStore } = require('bottender');

const sessionStore = getSessionStore();
  • [new] Added getClient helper function to access underlying messaging client configured by bottender.config.js (#634):
const { getClient } = require('bottender');

const messenger = getClient('messenger');

messenger.sendText(USER_ID, 'Hello!', { tag: 'CONFIRMED_EVENT_UPDATE' });

const line = getClient('line');

line.pushText(USER_ID, 'Hello!');

slack

  • [new] add includeBotMessages option for interacting with bot_message (#635):
// bottender.config.js

module.exports = {
  // ...
  slack: {
    enabled: true,
    path: '/webhooks/slack',
    accessToken: process.env.SLACK_ACCESS_TOKEN,
    verificationToken: process.env.SLACK_VERIFICATION_TOKEN,
    includeBotMessages: true, // add this line
  },
};

Then you can use context.event.isBotMessage to determine if the event is a bot message event:

module.exports = function App(context) {
  if (context.event.isBotMessage) {
    console.log(context.event.rawEvent.botId);
  }
};

1.0.8 / 2020-01-08

08 Jan 08:08
Compare
Choose a tag to compare
  • [fix] fix(Bot, LineConnector, MessengerConnector): when receiving multiple events, construct session with event instead of request #621