Skip to content

Commit 46c0573

Browse files
committed
Fixed Active state of CollectorClient
1 parent 4af3e2f commit 46c0573

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/appTemplates/CollectorClient.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ class CollectorClient {
3232
}
3333

3434
get status () {
35+
// TODO the following test is bogus this.eventData.status does not exists
3536
if (!this.accessData && this.eventData.status === CollectorClient.STATUSES.refused) {
3637
return CollectorClient.STATUSES.refused;
3738
}
39+
if (this.accessData) return CollectorClient.STATUSES.active;
3840
return CollectorClient.STATUSES.incoming;
3941
}
4042

tests/apptemplates.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ describe('[APTX] appTemplates', function () {
212212
const acceptResult = await collectorClient.accept();
213213
assert.equal(acceptResult.requesterEvent.content.eventId, inviteSharingData.eventId);
214214
assert.ok(!!acceptResult.requesterEvent.content.apiEndpoint);
215+
assert.equal(collectorClient.status, 'Active');
215216

216217
// force refresh and check online
217218
const collectorClients2 = await appClient.getCollectorClients(true);

0 commit comments

Comments
 (0)