@ray-js/t-agent-plugin-aistream 0.2.5-beta-1 → 0.2.5-beta-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -69,14 +69,17 @@ export class AsrAgent {
69
69
 
70
70
  /** 获取录音权限 */
71
71
  getRecordScope() {
72
- if (this.authorized !== null) {
72
+ if (this.authorized === true) {
73
73
  return Promise.resolve(this.authorized);
74
74
  }
75
75
  return authorize({
76
76
  scope: 'scope.record'
77
- }).then(() => true, () => false).then(authorized => {
78
- this.authorized = authorized;
79
- return authorized;
77
+ }).then(() => {
78
+ this.authorized = true;
79
+ return true;
80
+ }, () => {
81
+ this.authorized = false;
82
+ return false;
80
83
  });
81
84
  }
82
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/t-agent-plugin-aistream",
3
- "version": "0.2.5-beta-1",
3
+ "version": "0.2.5-beta-2",
4
4
  "author": "Tuya.inc",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "@types/url-parse": "^1.4.11"
37
37
  },
38
- "gitHead": "810116f5c6fc08b98db2f7d5725f2bacbedfeaf1"
38
+ "gitHead": "cde788174a2b63520507f0606c1e9d41679b46d1"
39
39
  }