diff --git a/ASFEnhance/Profile/WebRequest.cs b/ASFEnhance/Profile/WebRequest.cs index 5df3b7a..8e13eed 100644 --- a/ASFEnhance/Profile/WebRequest.cs +++ b/ASFEnhance/Profile/WebRequest.cs @@ -191,14 +191,13 @@ internal static async Task ApplyCustomAvatar(Bot bot, string imgUrl) return Langs.DownloadImageFailed; } - var cc = bot.ArchiWebHandler.WebBrowser.CookieContainer.GetCookies(SteamCommunityURL); - var session = cc["sessionid"]; + var session = FetchSessionId(bot); var avatar = new ByteArrayContent(bytes.ToArray()); avatar.Headers.ContentType = new MediaTypeHeaderValue("image/png"); var type = new StringContent("player_avatar_image", Encoding.UTF8); var sId = new StringContent(bot.SteamID.ToString(), Encoding.UTF8); - var sessionid = new StringContent(session?.Value ?? "", Encoding.UTF8); + var sessionid = new StringContent(session ?? "", Encoding.UTF8); var doSub = new StringContent("1", Encoding.UTF8); var json = new StringContent("1", Encoding.UTF8); diff --git a/Directory.Build.props b/Directory.Build.props index 0aec292..b1031da 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 1.8.2.0 + 1.8.3.0