Skip to content

Commit

Permalink
Remove space-custom-client Ably-Agent
Browse files Browse the repository at this point in the history
It's no longer needed since a client is always passed to the constructor
now.

Signed-off-by: Lewis Marshall <lewis.marshall@ably.com>
  • Loading branch information
lmars committed Dec 12, 2023
1 parent 88a4046 commit 6fb182b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/Spaces.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ describe('Spaces', () => {
const spaces = new Spaces(client);
expect(client.options.agents).toEqual({
spaces: spaces.version,
'space-custom-client': true,
});
});

Expand All @@ -54,7 +53,6 @@ describe('Spaces', () => {
expect(ablyClient.options.agents).toEqual({
'some-client': '1.2.3',
spaces: spaces.version,
'space-custom-client': true,
});
});
});
2 changes: 1 addition & 1 deletion src/Spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Spaces {
}

private addAgent(options: { agents?: Record<string, string | boolean> }) {
const agent = { spaces: this.version, 'space-custom-client': true };
const agent = { spaces: this.version };
options.agents = { ...(options.agents ?? options.agents), ...agent };
}

Expand Down

0 comments on commit 6fb182b

Please sign in to comment.