Fix issue where last contact isn't sent if matchmaking is disabled

This commit is contained in:
sudokoko 2024-03-17 19:58:14 -04:00
parent be452270e3
commit a9944ec74d
No known key found for this signature in database
GPG key ID: 248D68C664937395

View file

@ -43,6 +43,8 @@ public class MatchController : ControllerBase
UserEntity? user = await this.database.UserFromGameToken(token);
if (user == null) return this.Forbid();
await LastContactHelper.SetLastContact(this.database, user, token.GameVersion, token.Platform);
// Do not allow matchmaking if it has been disabled
if (!ServerConfiguration.Instance.Matchmaking.MatchmakingEnabled) return this.BadRequest();
@ -79,8 +81,6 @@ public class MatchController : ControllerBase
#endregion
await LastContactHelper.SetLastContact(this.database, user, token.GameVersion, token.Platform);
#region Process match data
switch (matchData)