Skip to content

Commit 8ec702b

Browse files
committed
Making sure hasChatFeature is computed correctly
1 parent d1af8fd commit 8ec702b

7 files changed

Lines changed: 10 additions & 6 deletions

File tree

docs/hds-lib.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/hds-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/tests-browser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1700,7 +1700,7 @@ class CollectorClient {
17001700
return this.eventData.content.requesterEventData.content;
17011701
}
17021702
get hasChatFeature() {
1703-
return this.requestData.features.chat != null;
1703+
return this.requestData.features?.chat != null;
17041704
}
17051705
get chatSettings() {
17061706
if (!this.hasChatFeature)
@@ -24013,6 +24013,7 @@ describe('[APTX] appTemplates', function () {
2401324013
it('[APIA] Collector invite accept', async () => {
2401424014
const { collector, collectorClient, invite } = await helperNewInvite(appManaging, appClient, 'APIA');
2401524015
assert.ok(invite.status, 'pending');
24016+
assert.ok(!collectorClient.hasChatFeature);
2401624017
await collectorClient.accept();
2401724018
await collector.checkInbox();
2401824019
assert.ok(invite.status, 'active');
@@ -24021,6 +24022,7 @@ describe('[APTX] appTemplates', function () {
2402124022

2402224023
it('[APIZ] Collector - with chat', async () => {
2402324024
const { collector, collectorClient, invite } = await helperNewInvite(appManaging, appClient, 'APIZ', { addChat: true });
24025+
assert.ok(collectorClient.hasChatFeature);
2402424026
await collectorClient.accept();
2402524027
await collector.checkInbox();
2402624028
assert.ok(invite.hasChat);

docs/tests-browser.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/appTemplates/CollectorClient.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/appTemplates/CollectorClient.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/apptemplates.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ describe('[APTX] appTemplates', function () {
274274
it('[APIA] Collector invite accept', async () => {
275275
const { collector, collectorClient, invite } = await helperNewInvite(appManaging, appClient, 'APIA');
276276
assert.ok(invite.status, 'pending');
277+
assert.ok(!collectorClient.hasChatFeature);
277278
await collectorClient.accept();
278279
await collector.checkInbox();
279280
assert.ok(invite.status, 'active');
@@ -282,6 +283,7 @@ describe('[APTX] appTemplates', function () {
282283

283284
it('[APIZ] Collector - with chat', async () => {
284285
const { collector, collectorClient, invite } = await helperNewInvite(appManaging, appClient, 'APIZ', { addChat: true });
286+
assert.ok(collectorClient.hasChatFeature);
285287
await collectorClient.accept();
286288
await collector.checkInbox();
287289
assert.ok(invite.hasChat);

0 commit comments

Comments
 (0)