Commit graph

250 commits

Author SHA1 Message Date
Archi
f874598fd8
Misc 2024-03-21 22:37:09 +01:00
ArchiBot
6428e5abd1
Automatic translations update 2024-03-17 02:05:53 +00:00
Archi
b86f83a634
Misc 2024-03-17 02:54:28 +01:00
Archi
48a14136a9
Update all file headers, again 2024-03-17 02:35:40 +01:00
Archi
f98a159799
File header update 2024-03-17 00:06:13 +01:00
ArchiBot
e21fa45718
Automatic translations update 2024-03-13 02:05:37 +00:00
ArchiBot
4843d539f0
Automatic translations update 2024-03-12 02:04:54 +00:00
ArchiBot
14c905b8ef
Automatic translations update 2024-03-07 01:56:16 +00:00
Archi
7a13895429
Fix false positives 2024-02-23 02:49:03 +01:00
Archi
d3aa881f55
Fix STD serialization after STJ changes 2024-02-23 02:42:18 +01:00
Łukasz Domeradzki
6b0bf0f9c1
Closes #3061 (#3145)
* Good start

* Misc

* Make ApiAuthenticationMiddleware use new json

* Remove first newtonsoft dependency

* Pull latest ASFB json enhancements

* Start reimplementing newtonsoft!

* One thing at a time

* Keep doing all kind of breaking changes which need to be tested later

* Add back ShouldSerialize() support

* Misc

* Eradicate remaining parts of newtonsoft

* WIP

* Workaround STJ stupidity in regards to derived types

STJ can't serialize derived type properties by default, so we'll use another approach in our serializable file function

* Make CI happy

* Bunch of further fixes

* Fix AddFreeLicense() after rewrite

* Add full support for JsonDisallowNullAttribute

* Optimize our json utilities even further

* Misc

* Add support for fields in disallow null

* Misc optimization

* Fix deserialization of GlobalCache in STD

* Fix non-public [JsonExtensionData]

* Fix IM missing method exception, correct db storage helpers

* Fix saving into generic databases

Thanks STJ

* Make Save() function abstract to force inheritors to implement it properly

* Correct ShouldSerializeAdditionalProperties to be a method

* Misc cleanup

* Code review

* Allow JSON comments in configs, among other

* Allow trailing commas in configs

Users very often add them accidentally, no reason to throw on them

* Fix confirmation ID

Probably needs further fixes, will need to check later

* Correct confirmations deserialization

* Use JsonNumberHandling

* Misc

* Misc

* [JsonDisallowNull] corrections

* Forbid [JsonDisallowNull] on non-nullable structs

* Not really but okay

* Add and use ToJson() helpers

* Misc

* Misc
2024-02-21 03:09:36 +01:00
Archi
d08740b6d7
Schedule refresh of licenses for STD plugin with delay
This addresses two things:
- It allows for better load-balancing, as STD refresh can be postponed for a short while after bot logs in - it has more important matters to handle right away, and STD is optional/supportive plugin.
- It helps @xPaw sleep better at night working around fools with their ASFs crashing thirty times per second due to third-party plugins.
2024-02-02 13:17:55 +01:00
Archi
fc760e1a84
Misc 2024-01-30 14:30:52 +01:00
Archi
608bece8dc
Misc 2024-01-29 18:49:29 +01:00
Archi
119caebfa8
Deprecate CachedAccessToken, move to Bot.AccessToken instead
Thanks to @xPaw findings, it seems that access token we get on logon can be used for all functionality we require in ASF. This means we no longer need to fetch the one from points shop in AWH and can safely remove that.

Since access token in AWH is public API, this commit:
- Makes Bot.AccessToken public API.
- Deprecates ArchiWebHandler.CachedAccessToken with intention of removal in the next version. Until then, it resolves to Bot.AccessToken internally so all plugins can keep working during transition period.
- Deprecates Utilities.ReadJwtToken(), probably nobody else than me used it, just switch over to Utilities.TryReadJwtToken(), much better design.
- Reverts ArchiCacheable parts back to stable API, as we no longer need the breaking change done in #3133
2024-01-29 18:42:21 +01:00
Archi
2e0771b8d9
Closes #3133
After investigation, it turns out that the token actually has correct scope (THANK GOD), it's the fact that Valve started issuing those on much shorter notice than our cache.

Up until now, we played it smartly by assuming cached access token should be valid for at least 6 hours, since every time we visited the page, we got a new token that was valid for 24h since issuing. This however is no longer the case and Valve seems to recycle the same token for every request now, probably until we get close to its expiration. This also means that with unlucky timing, we might be trying to use access token that has expired already even for up to 6 more hours, which is unwanted and causes all kind of issues, with 403 in trade offers being one of them.

I could make stupid solution and cache token for shorter, e.g. 1 minute, but instead I did 200 IQ move and rewrote the functionality in a way to actually parse that token, its validity, and set the cache to be valid for a brief moment before the token actually expires. This way, we're not only more efficient (we can cache the token even for 24h if needed), but we're also invalidating it as soon as it goes out of the scope.
2024-01-29 17:53:46 +01:00
ArchiBot
ce5cd7bc8f
Automatic translations update 2024-01-24 02:09:10 +00:00
Sebastian Göls
dbf7148fbe
Happy new year! (#3121)
Co-authored-by: Sebastian Göls <sebastian.goels@salvagninigroup.com>
2024-01-08 11:33:28 +01:00
Archi
1f2269dcf2
Misc code syntax 2024-01-03 15:06:08 +01:00
Archi
12c4b7e924
Apply frozen collections optimizations 2024-01-03 13:46:54 +01:00
Archi
7f1ecdd585
Misc 2024-01-01 23:22:19 +01:00
Archi
01b2e205be
Make std command return before refresh finishes 2024-01-01 23:16:52 +01:00
ArchiBot
e6c6bce8a7
Automatic translations update 2023-12-25 02:07:40 +00:00
Archi
40ab1d848c
.NET 8 code enhancements 2023-12-11 23:55:13 +01:00
Archi
b16a459ab8
Misc 2023-12-05 01:53:14 +01:00
Archi
da2fd37aa1
Make STD work also in on-demand mode 2023-12-05 01:43:55 +01:00
Archi
8d1d508fe5
Use ASF's global database for STD package access tokens 2023-12-05 00:05:16 +01:00
ArchiBot
ba1313f44f
Automatic translations update 2023-11-24 02:06:46 +00:00
ArchiBot
81118633e0
Automatic translations update 2023-11-21 02:09:39 +00:00
Sebastian Göls
193f0e3c08
Use generic ProducesResponseTypeAttribute instead of typeof(...) (#3074) 2023-11-16 21:49:15 +01:00
Archi
3f04144e41
Use cancellation in more places 2023-11-14 21:20:51 +01:00
Archi
adbf0748f8
Closes #3066 2023-11-14 21:10:35 +01:00
Archi
f2ff2f4929
Closes #3060 2023-11-14 20:01:29 +01:00
Łukasz Domeradzki
b34f18497d
.NET 8 (#3005)
* Initial .NET 8

* Make it compile in release mode ignoring warnings for now

* First round of improvements

* Second round of improvements

* Third round of improvements

* Use new throws

* Fix .NET Framework, YAY, thanks madness!

Madness devs are awesome

* Misc

* Misc

* AF_NETLINK might be required for some http calls

No clue why

* Fix service files

Doesn't do what it should

* Update CardsFarmer.cs

* New improvements

* Address feedback

* Misc

* Misc

* Misc refactor

* Misc
2023-11-14 19:12:33 +01:00
Archi
e1c364cf7a
Fix wrong Bosnian language mapping 2023-11-14 15:38:10 +01:00
Archi
2a231982ed
Misc 2023-10-30 22:44:07 +01:00
ArchiBot
25e43d61e6
Automatic translations update 2023-10-29 02:06:37 +00:00
ArchiBot
e97c660b08
Automatic translations update 2023-10-23 02:05:53 +00:00
ArchiBot
0df46a08da
Automatic translations update 2023-10-20 02:05:48 +00:00
ArchiBot
4106c5f41a
Automatic translations update 2023-10-19 02:05:44 +00:00
ArchiBot
8bd3c8b20d
Automatic translations update 2023-10-10 02:05:49 +00:00
ArchiBot
4dbd9720f2
Automatic translations update 2023-10-06 02:05:38 +00:00
ArchiBot
173a0f18b9
Automatic translations update 2023-07-23 02:17:32 +00:00
Archi
bceef4f74e
Fix Abry potato server 2023-07-13 22:47:42 +02:00
ArchiBot
c30f7f9f0c
Automatic translations update 2023-06-28 02:23:42 +00:00
ArchiBot
e7933257bc
Automatic translations update 2023-06-19 02:19:27 +00:00
ArchiBot
bf8275d34a
Automatic translations update 2023-06-01 02:33:30 +00:00
ArchiBot
3d411a868a
Automatic translations update 2023-05-04 02:10:48 +00:00
ArchiBot
1e91408044
Automatic translations update 2023-04-18 02:10:44 +00:00
Pavel Djundik
19fbdd1bdd
Update server url (#2870) 2023-04-09 21:17:39 +02:00