Files
tbd-station-14/Content.Server/Preferences/Managers/IServerPreferencesManager.cs
Pieter-Jan Briers 9efe4dc701 Fix preferences sent to client not being sanitized (#27789)
Fucking whoops

In #27742 I made it so sanitization of character profiles was moved to be *after* database load. Except that means I moved it to be after the copy of all character profiles got sent to the client.

Move the sending to *also* be in that second load stage, and rename it. Fixes the issue.
2024-05-08 04:24:54 +02:00

25 lines
924 B
C#

using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Content.Shared.Preferences;
using Robust.Shared.Network;
using Robust.Shared.Player;
namespace Content.Server.Preferences.Managers
{
public interface IServerPreferencesManager
{
void Init();
Task LoadData(ICommonSession session, CancellationToken cancel);
void FinishLoad(ICommonSession session);
void OnClientDisconnected(ICommonSession session);
bool TryGetCachedPreferences(NetUserId userId, [NotNullWhen(true)] out PlayerPreferences? playerPreferences);
PlayerPreferences GetPreferences(NetUserId userId);
PlayerPreferences? GetPreferencesOrNull(NetUserId? userId);
IEnumerable<KeyValuePair<NetUserId, ICharacterProfile>> GetSelectedProfilesForPlayers(List<NetUserId> userIds);
bool HavePreferencesLoaded(ICommonSession session);
}
}