Google SDK 上的操作无法使用 updatePermission

Actions on Google SDK can not use updatePermission

我正在为 Google 家庭和 Google 助手开发应用程序。我为 webhook 使用 firebase 云函数。

我一直在尝试获得推送通知的许可,并以此 link https://developers.google.com/actions/assistant/updates/notifications 作为指南。但是,每当我尝试达到更新意图时,我都会收到错误消息。 当我尝试调试它时,我意识到我无法到达 if 条件的内部,即使我能做到,也无法达到 'setup_push' 意图。 这是我使用的代码:

    app.intent('Default Welcome Intent', conv => {
  conv.ask('Do you want to get update?');
  conv.ask(new Suggestions('Alert me of new tips'));
  const userInput = conv.input.raw;
if ( userInput === 'Alert me of new tips') {
  app.intent('setup_push', (conv) => {
    conv.ask(new UpdatePermission({intent: 'sendNotif'})
    );
  });
}
});

显示的错误如下:

expected_inputs[0].possible_intents[0].input_value_data: The intent the app is asking for permission to send updates for is not found..

我该如何解决这个问题?

开始使用 DialogFlow SDK 并将其更改为此并有效。我想,问题是试图以相同的意图使用权限助手。

app.intent('Default Welcome Intent', (conv) => {
  conv.ask(new UpdatePermission({
    intent: 'sendNotif'
  }));
});


app.intent('finish_push_setup', (conv) => {
  if (conv.arguments.get('PERMISSION')) {
    conv.close(`Ok, I'll start alerting you.`);
  } else {
    conv.close(`Ok, I won't alert you.`);
  }
});