Skip to content

Commit 19b8bc2

Browse files
author
Cédric Belin
committed
Bug fix
1 parent 211cc14 commit 19b8bc2

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/author.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Belin.Akismet;
99
public class Author(string ipAddress) {
1010

1111
/// <summary>
12-
/// The author's mail address. If you set it to `"akismet-guaranteed-spam@example.com"`, Akismet will always return `true`.
12+
/// The author's mail address. If you set it to <c>"akismet-guaranteed-spam@example.com"</c>, Akismet will always return <see langword="true"/>.
1313
/// </summary>
1414
public string Email { get; set; } = string.Empty;
1515

@@ -19,12 +19,12 @@ public class Author(string ipAddress) {
1919
public IPAddress IPAddress { get; set; } = IPAddress.Parse(ipAddress);
2020

2121
/// <summary>
22-
/// The author's name. If you set it to `"viagra-test-123"`, Akismet will always return `true`.
22+
/// The author's name. If you set it to <c>"viagra-test-123"</c>, Akismet will always return <see langword="true"/>.
2323
/// </summary>
2424
public string Name { get; set; } = string.Empty;
2525

2626
/// <summary>
27-
/// The author's role. If you set it to `"administrator"`, Akismet will always return `false`.
27+
/// The author's role. If you set it to <c>"administrator"</c>, Akismet will always return <see langword="false"/>.
2828
/// </summary>
2929
public string Role { get; set; } = string.Empty;
3030

src/client.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Belin.Akismet;
1111
public class Client(string apiKey, Blog blog, string baseUrl = "https://rest.akismet.com") {
1212

1313
/// <summary>
14-
/// The response returned by the `submit-ham` and `submit-spam` endpoints when the outcome is a success.
14+
/// The response returned by the <c>submit-ham</c> and <c>submit-spam</c> endpoints when the outcome is a success.
1515
/// </summary>
1616
private const string Success = "Thanks for making the web a better place.";
1717

@@ -53,7 +53,7 @@ public class Client(string apiKey, Blog blog, string baseUrl = "https://rest.aki
5353
/// <returns>A value indicating whether the specified comment is spam.</returns>
5454
/// <exception cref="HttpRequestException">The remote server returned an invalid response.</exception>
5555
public async Task<CheckResult> CheckComment(Comment comment, CancellationToken cancellationToken = default) {
56-
using var response = await Fetch("comment-check", comment.ToJson(), cancellationToken);
56+
using var response = await Fetch("1.1/comment-check", comment.ToJson(), cancellationToken);
5757
if (await response.Content.ReadAsStringAsync(cancellationToken) == "false") return CheckResult.Ham;
5858
if (!response.Headers.TryGetValues("X-akismet-pro-tip", out var proTips)) return CheckResult.Spam;
5959
return proTips.First() == "discard" ? CheckResult.PervasiveSpam : CheckResult.Spam;

test/client_test.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
namespace Belin.Akismet;
22

3-
using System;
43
using System.Threading.Tasks;
54

65
/// <summary>

0 commit comments

Comments
 (0)