Skip to content

Releases: Yoctol/bottender

0.14.33 / 2018-04-13

13 Apr 11:46
Compare
Choose a tag to compare
  • [new] add more debug logs (#239)
  • [fix] Fixes webhook verification with Micro when verifyToken is set in bot (#236)

0.14.32 / 2018-04-12

12 Apr 10:03
4461004
Compare
Choose a tag to compare
  • [fix] MemoryCacheStore: make sure read as different object to prevent reading same key multiple times, causing freezed by other events.

0.14.31 / 2018-03-26

26 Mar 07:26
Compare
Choose a tag to compare
  • [new] alias LINE ButtonsTemplate to ButtonTemplate to match type name buttons #219

Aliases:

  • replyButtonsTemplate -> replyButtonTemplate
  • pushButtonsTemplate -> pushButtonTemplate
  • sendButtonsTemplate -> sendButtonTemplate

0.14.30 / 2018-03-22

0.14.29 / 2018-03-21

21 Mar 10:53
Compare
Choose a tag to compare

telegram

  • [new] Add new Get APIs to TelegramContext:
context.getUserProfilePhotos({ limit: 1 }).then(result => {
  console.log(result);
  // {
  //   total_count: 3,
  //   photos: [
  //     [
  //       {
  //         file_id: 'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',
  //         file_size: 14650,
  //         width: 160,
  //         height: 160,
  //       },
  //       {
  //         file_id: 'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',
  //         file_size: 39019,
  //         width: 320,
  //         height: 320,
  //       },
  //       {
  //         file_id: 'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',
  //         file_size: 132470,
  //         width: 640,
  //         height: 640,
  //       },
  //     ],
  //   ],
  // }
});
context.getChat().then(result => {
  console.log(result);
  // {
  //   id: 313534466,
  //   first_name: 'first',
  //   last_name: 'last',
  //   username: 'username',
  //   type: 'private',
  // }
});
context.getChatAdministrators().then(result => {
  console.log(result);
  // [
  //   {
  //     user: {
  //       id: 313534466,
  //       first_name: 'first',
  //       last_name: 'last',
  //       username: 'username',
  //       languange_code: 'zh-TW',
  //     },
  //     status: 'creator',
  //   },
  // ]
});
context.getChatMembersCount().then(result => {
  console.log(result);
  // '6'
});
context.getChatMember().then(result => {
  console.log(result);
  // {
  //   user: {
  //     id: 313534466,
  //     first_name: 'first',
  //     last_name: 'last',
  //     username: 'username',
  //     languange_code: 'zh-TW',
  //   },
  //   status: 'creator',
  // }
});

0.14.28 / 2018-03-20

0.14.27 / 2018-03-19

19 Mar 10:21
Compare
Choose a tag to compare

line

  • [new] Add new LineContext methods:
context.getUserProfile().then(profile => {
  console.log(profile);
  // {
  //   displayName: 'LINE taro',
  //   userId: USER_ID,
  //   pictureUrl: 'http://obs.line-apps.com/...',
  //   statusMessage: 'Hello, LINE!',
  // }
});
context.getMemberProfile(USER_ID).then(member => {
  console.log(member);
  // {
  //   "displayName":"LINE taro",
  //   "userId":"Uxxxxxxxxxxxxxx...",
  //   "pictureUrl":"http://obs.line-apps.com/..."
  // }
});
context.getMemberIds(CURSOR).then(res => {
  console.log(res);
  // {
  //   memberIds: [
  //     'Uxxxxxxxxxxxxxx...',
  //     'Uxxxxxxxxxxxxxx...',
  //     'Uxxxxxxxxxxxxxx...'
  //   ],
  //   next: 'jxEWCEEP...'
  // }
});
context.getAllMemberIds().then(ids => {
  console.log(ids);
  // [
  //   'Uxxxxxxxxxxxxxx..1',
  //   'Uxxxxxxxxxxxxxx..2',
  //   'Uxxxxxxxxxxxxxx..3',
  //   'Uxxxxxxxxxxxxxx..4',
  //   'Uxxxxxxxxxxxxxx..5',
  //   'Uxxxxxxxxxxxxxx..6',
  // ]
});

0.14.26 / 2018-03-17

17 Mar 07:04
Compare
Choose a tag to compare

messenger

  • [new] Implement context.getUserProfile:
const user = await context.getUserProfile();
// {
//   first_name: 'Kevin',
//   last_name: 'Durant',
//   profile_pic: 'https://example.com/pic.png',
//   locale: 'en_US',
//   timezone: 8,
//   gender: 'male',
// };
  • [new] Implement context.sendSenderAction:
context.sendSenderAction('typing_on');
// same as
context.typingOn();
  • [fix] Fix metadata argument in handover methods (#208)

viber

  • [new] Implement context.getUserDetails:
const user = await context.getUserDetails();
// {
//   id: '01234567890A=',
//   name: 'John McClane',
//   avatar: 'http://avatar.example.com',
//   country: 'UK',
//   language: 'en',
//   primary_device_os: 'android 7.1',
//   api_version: 1,
//   viber_version: '6.5.0',
//   mcc: 1,
//   mnc: 1,
//   device_type: 'iPhone9,4',
// };
  • [new] Implement context.getOnlineStatus:
const status = await context.getOnlineStatus();
// {
//   id: '01234567890=',
//   online_status: 0,
//   online_status_message: 'online',
// }

0.14.25 / 2018-03-13

13 Mar 04:52
Compare
Choose a tag to compare

console

  • [new] Support using /exit to exit

messenger

  • [new] Support passing verifyToken to MessengerBot or MessengerConnector (#204)

Support both:

  • pass verifyToken in server config
const bot = new MessengerBot({
  accessToken: config.accessToken,
  appSecret: config.appSecret,
});

const server = createServer(bot, { verifyToken: config.verifyToken });
  • pass verifyToken in bot config
const bot = new MessengerBot({
  accessToken: config.accessToken,
  appSecret: config.appSecret,
  verifyToken: config.verifyToken,
});

const server = createServer(bot);

line

  • [fix] Fix LINE join, leave events which do not have userId will fail get profile (#206)

0.14.24 / 2018-03-11

10 Mar 16:36
Compare
Choose a tag to compare
  • [fix] Upgrade @slack/client deps to fix security vulnerability