Skip to content

Commit

Permalink
fix 修正 VOTE 逻辑bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed Nov 23, 2023
1 parent 363f1b0 commit c163884
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions ASFEnhance/Event/WebRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ internal sealed record NominatePayload
/// <param name="gameID"></param>
/// <param name="categoryID"></param>
/// <param name="token"></param>
/// <param name="semaphore"></param>
/// <returns></returns>
internal static async Task MakeVote(Bot bot, int gameID, int categoryID, string token, SemaphoreSlim semaphore)
{
Expand All @@ -189,17 +190,17 @@ internal static async Task MakeVote(Bot bot, int gameID, int categoryID, string
{
CategoryId = categoryID,
NominatedId = gameID,
Source = 3,
Source = 7,
};
var enc = ProtoBufEncode(payload);
var enc = ProtoBufEncode(payload).Replace("=", "%3D").Replace("+", "%2B");

var request = new Uri(SteamApiURL, $"ISteamAwardsService/Nominate/v1?access_token={token}&origin=https://store.steampowered.com&input_protobuf_encoded={enc}");

await bot.ArchiWebHandler.UrlGetToHtmlDocumentWithSession(request, referer: SteamStoreURL).ConfigureAwait(false);
}
finally
{
await Task.Delay(500).ConfigureAwait(false);
await Task.Delay(800).ConfigureAwait(false);
semaphore.Release();
}
}
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>2.0.1.2</Version>
<Version>2.0.1.3</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit c163884

Please sign in to comment.