Repository: Yoctol/bottender
Pull request #780 (2020-05-22 14:31:58)

fix(messenger cli): remove deprecated properties on messenger profiles (including home_url)
#776

> The home_url property on Page Messenger Profiles has been deprecated for all operations (GET, POST, and DELETE).

https://developers.facebook.com/docs/graph-api/changelog/version7.0

codecov-commenter: # [Codecov](https://codecov.io/gh/Yoctol/bottender/pull/780?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@e298112`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/Yoctol/bottender/pull/780/graphs/tree.svg?width=650&height=150&src=pr&token=JX3EGtxYH3)](https://codecov.io/gh/Yoctol/bottender/pull/780?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##             master     #780   +/-   ##
=========================================
  Coverage          ?   81.24%           
=========================================
  Files             ?      108           
  Lines             ?     4645           
  Branches          ?     1172           
=========================================
  Hits              ?     3774           
  Misses            ?      822           
  Partials          ?       49           
```


| [Impacted Files](https://codecov.io/gh/Yoctol/bottender/pull/780?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...s/bottender/src/cli/providers/messenger/profile.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvYm90dGVuZGVyL3NyYy9jbGkvcHJvdmlkZXJzL21lc3Nlbmdlci9wcm9maWxlLnRz) | `86.60% <ø> (ø)` | |
| [...ckages/bottender/src/telegram/TelegramConnector.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvYm90dGVuZGVyL3NyYy90ZWxlZ3JhbS9UZWxlZ3JhbUNvbm5lY3Rvci50cw==) | `96.55% <0.00%> (ø)` | |
| [packages/create-bottender-app/src/index.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvY3JlYXRlLWJvdHRlbmRlci1hcHAvc3JjL2luZGV4LnRz) | `0.00% <0.00%> (ø)` | |
| [packages/bottender/src/whatsapp/WhatsappEvent.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvYm90dGVuZGVyL3NyYy93aGF0c2FwcC9XaGF0c2FwcEV2ZW50LnRz) | `100.00% <0.00%> (ø)` | |
| [.../bottender/src/cli/providers/sh/utils/argCommon.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvYm90dGVuZGVyL3NyYy9jbGkvcHJvdmlkZXJzL3NoL3V0aWxzL2FyZ0NvbW1vbi50cw==) | `100.00% <0.00%> (ø)` | |
| [...ckages/bottender/src/messenger/MessengerContext.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvYm90dGVuZGVyL3NyYy9tZXNzZW5nZXIvTWVzc2VuZ2VyQ29udGV4dC50cw==) | `95.96% <0.00%> (ø)` | |
| [packages/bottender/src/slack/routes.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvYm90dGVuZGVyL3NyYy9zbGFjay9yb3V0ZXMudHM=) | `100.00% <0.00%> (ø)` | |
| [...s/bottender/src/cli/providers/messenger/persona.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvYm90dGVuZGVyL3NyYy9jbGkvcHJvdmlkZXJzL21lc3Nlbmdlci9wZXJzb25hLnRz) | `85.57% <0.00%> (ø)` | |
| [packages/bottender/src/chain.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvYm90dGVuZGVyL3NyYy9jaGFpbi50cw==) | `76.92% <0.00%> (ø)` | |
| [packages/bottender/src/cache/RedisCacheStore.ts](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree#diff-cGFja2FnZXMvYm90dGVuZGVyL3NyYy9jYWNoZS9SZWRpc0NhY2hlU3RvcmUudHM=) | `100.00% <0.00%> (ø)` | |
| ... and [99 more](https://codecov.io/gh/Yoctol/bottender/pull/780/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/Yoctol/bottender/pull/780?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Yoctol/bottender/pull/780?src=pr&el=footer). Last update [e298112...9286c38](https://codecov.io/gh/Yoctol/bottender/pull/780?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/packages/bottender/src/cli/providers/messenger/profile.ts b/packages/bottender/src/cli/providers/messenger/profile.ts
index fd2f688d..3099de5c 100644
--- a/packages/bottender/src/cli/providers/messenger/profile.ts
+++ b/packages/bottender/src/cli/providers/messenger/profile.ts
@@ -19,9 +19,6 @@ const FIELDS = [
   'greeting',
   'ice_breakers',
   'whitelisted_domains',
-  'payment_settings',
-  'target_audience',
-  'home_url',
 ];
 
 export const help = (): void => {


Test patch:
diff --git a/packages/bottender/src/cli/providers/messenger/__tests__/deleteMessengerProfile.spec.ts b/packages/bottender/src/cli/providers/messenger/__tests__/deleteMessengerProfile.spec.ts
index b1049015..4a2a3435 100644
--- a/packages/bottender/src/cli/providers/messenger/__tests__/deleteMessengerProfile.spec.ts
+++ b/packages/bottender/src/cli/providers/messenger/__tests__/deleteMessengerProfile.spec.ts
@@ -51,9 +51,6 @@ describe('resolved', () => {
       'greeting',
       'ice_breakers',
       'whitelisted_domains',
-      'payment_settings',
-      'target_audience',
-      'home_url',
     ]);
   });
 });
diff --git a/packages/bottender/src/cli/providers/messenger/__tests__/getMessengerProfile.spec.ts b/packages/bottender/src/cli/providers/messenger/__tests__/getMessengerProfile.spec.ts
index b31845ec..1716ad66 100644
--- a/packages/bottender/src/cli/providers/messenger/__tests__/getMessengerProfile.spec.ts
+++ b/packages/bottender/src/cli/providers/messenger/__tests__/getMessengerProfile.spec.ts
@@ -50,9 +50,6 @@ describe('resolved', () => {
       'greeting',
       'ice_breakers',
       'whitelisted_domains',
-      'payment_settings',
-      'target_audience',
-      'home_url',
     ]);
   });
 
diff --git a/packages/bottender/src/cli/providers/messenger/__tests__/setMessengerProfile.spec.ts b/packages/bottender/src/cli/providers/messenger/__tests__/setMessengerProfile.spec.ts
index ca6bbf4e..bfe8eb51 100644
--- a/packages/bottender/src/cli/providers/messenger/__tests__/setMessengerProfile.spec.ts
+++ b/packages/bottender/src/cli/providers/messenger/__tests__/setMessengerProfile.spec.ts
@@ -85,9 +85,6 @@ describe('resolve', () => {
         'greeting',
         'ice_breakers',
         'whitelisted_domains',
-        'payment_settings',
-        'target_audience',
-        'home_url',
       ]);
       expect(_client.setMessengerProfile).toBeCalledWith({
         getStarted: {