Skip to content

Commit

Permalink
Fixes #20
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Oct 5, 2024
1 parent 734e94d commit 1b55cd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import process from "node:process";
import type {Blog} from "./blog.js";
import {CheckResult} from "./check_result.js";
import type {Comment} from "./comment.js";
Expand Down Expand Up @@ -56,7 +57,9 @@ export class Client {
this.baseUrl = new URL(url.endsWith("/") ? url : `${url}/`);
this.blog = blog;
this.isTest = options.isTest ?? false;
this.userAgent = options.userAgent ?? `${navigator.userAgent} | Akismet/${Client.#version}`;

const [nodeVersion] = process.version.slice(1).split(".");
this.userAgent = options.userAgent ?? `Node.js/${nodeVersion} | Akismet/${Client.#version}`;
}

/**
Expand Down

0 comments on commit 1b55cd0

Please sign in to comment.