Repository: Yoctol/bottender (ts)

Issue:
Inconsistent naming
PageInbox here:
https://github.com/Yoctol/bottender/blob/adf8696fb18cfab87fff18b5524626ba011d3ac8/src/context/MessengerContext.js#L272

Inbox here:
https://github.com/Yoctol/bottender/blob/f41fff520195df6ae66e1b7ffe48dd5c739e2eef/src/context/MessengerEvent.js#L707

which one is better, or make it both work

Pull request description:
Consistent naming
close #279 

Patch:
diff --git a/src/context/MessengerEvent.js b/src/context/MessengerEvent.js
index dcb6ee64..4b291063 100644
--- a/src/context/MessengerEvent.js
+++ b/src/context/MessengerEvent.js
@@ -701,10 +701,10 @@ export default class MessengerEvent implements Event {
   }
 
   /**
-   * Determine if the event is a request thread control event sent by facebook integrated inbox (appId is 263902037430900).
+   * Determine if the event is a request thread control event sent by facebook integrated 'Page Inbox' (appId is 263902037430900).
    *
    */
-  get isRequestThreadControlFromInbox(): boolean {
+  get isRequestThreadControlFromPageInbox(): boolean {
     return (
       !!this._rawEvent.request_thread_control &&
       typeof this._rawEvent.request_thread_control === 'object' &&


Test patch:
diff --git a/src/context/__tests__/MessengerEvent.spec.js b/src/context/__tests__/MessengerEvent.spec.js
index 43225875..22346feb 100644
--- a/src/context/__tests__/MessengerEvent.spec.js
+++ b/src/context/__tests__/MessengerEvent.spec.js
@@ -1232,19 +1232,19 @@ it('#isRequestThreadControl', () => {
   ).toEqual(true);
 });
 
-it('#isRequestThreadControlFromInbox', () => {
+it('#isRequestThreadControlFromPageInbox', () => {
   expect(
-    new MessengerEvent(textMessage).isRequestThreadControlFromInbox
+    new MessengerEvent(textMessage).isRequestThreadControlFromPageInbox
+  ).toEqual(false);
+  expect(
+    new MessengerEvent(postback).isRequestThreadControlFromPageInbox
   ).toEqual(false);
-  expect(new MessengerEvent(postback).isRequestThreadControlFromInbox).toEqual(
-    false
-  );
   expect(
     new MessengerEvent(requestThreadControlFromInbox).isRequestThreadControl
   ).toEqual(true);
   expect(
     new MessengerEvent(requestThreadControlFromInbox)
-      .isRequestThreadControlFromInbox
+      .isRequestThreadControlFromPageInbox
   ).toEqual(true);
 });