Skip to content

Releases: Yoctol/bottender

1.4.7 / 2020-06-23

23 Jun 04:04
Compare
Choose a tag to compare
  • [fix] add a workaround to support express behind trust proxies (for example: nginx) with:
server.enable('trust proxy');

// or
server.set('trust proxy', true);

1.4.6 / 2020-05-22

22 May 15:07
Compare
Choose a tag to compare

messenger

  • [fix] cli: remove deprecated properties on messenger profiles (including home_url).

1.4.5 / 2020-05-11

11 May 06:49
Compare
Choose a tag to compare
  • [fix] fix issue #618 ngrok undefined error message (#765)

1.4.4 / 2020-05-06

06 May 08:38
Compare
Choose a tag to compare

slack

  • [fix] convert slack interactive message event to camelcase (#755).

1.4.3 / 2020-04-29

29 Apr 06:45
Compare
Choose a tag to compare
  • [type] use string instead enum to compare.

1.4.2 / 2020-04-24

24 Apr 07:32
Compare
Choose a tag to compare
  • [type] improve TS types of the getClient function (#744)

1.4.1 / 2020-04-17

17 Apr 07:25
Compare
Choose a tag to compare

line

  • [fix] bump messaging-api-line to beta.20 and fix types in text methods (#742)

1.4.0 / 2020-04-15

15 Apr 10:43
Compare
Choose a tag to compare
  • [new] route: provides namespace.any for better readability (#719):
function App() {
  return router([
    messenger.any(HandleMessenger),
    line.any(HandleLine),
    slack.any(HandleSlack),
    telegram.any(HandleTelegram),
    viber.any(HandleViber),
    whatsapp.any(HandleWhatsapp),
  ]);
}
  • [new] support custom session store (#732):
// bottender.config.js

const { MemorySessionStore } = require('bottender');

module.exports = {
  session: {
    driver: 'memory2',
    stores: {
      memory2: new MemorySessionStore();
    },
  },
};
  • [fix] context: let getters return literal instead of string type (#724)
  • [type] improve types of withProps (#731)

messenger

  • [new] messenger: use v6.0 graph api as default (messaging-apis#556)
  • [new] support reaction event and routing (#718):

Support event.isReaction & event.react:

function App(context) {
  if (context.event.isReaction) {
    console.log(context.event.reaction);
    // {
    //   reaction: 'smile',
    //   emoji: '\u{2764}\u{FE0F}',
    //   action: 'react',
    //   mid: 'mid.$cAAE1UUyiiwthh0NPrVbVf4HFNDGl',
    //  }
  }
}

Support detect events in routers:

const { router, messenger } = require('bottender/router');

function App() {
  return router([
    messenger.reaction.react(HandleReactionReact),
    messenger.reaction.unreact(HandleReactionUnreact),
    messenger.reaction(HandleReaction),
  ]);
}

async function HandleReactionReact(context) {}
async function HandleReactionUnreact(context) {}
async function HandleReaction(context) {}
  • [new] add context.sendOneTimeNotifReqTemplate (#722):
context.sendOneTimeNotifReqTemplate({
  title: '<TITLE_TEXT>',
  payload: '<USER_DEFINED_PAYLOAD>',
});
  • [type] improve types of MessengerContext send methods (#729)

line

  • [new] export LineNotify (#721):
const { LineNotify } = require('bottender');
  • [type] add language to User (messaging-apis#563)
  • [type] add sticon to TextMessage (messaging-apis#564)
  • [type] export LINE flex types (messaging-apis#558)

bottender-dialogflow

  • [new] support text responses filled on Dialogflow.

create-bottender-app

  • [new] add lib es2018-es2020 by default.
  • [fix] let App action accept Action as return value (#734)

0.15.18 / 2020-04-08

08 Apr 06:29
Compare
Choose a tag to compare

line

  • [deps] bump messaging-api-line to 0.7.18 to support LINE domain changes.

1.3.5 / 2020-04-04

04 Apr 13:13
Compare
Choose a tag to compare
  • [fix] put router.d.ts into package files whitelist