Add privacy filter with channel whitelist (GDPR Art. 25)
Introduce an opt-out channel whitelist so the database only persists messages from channels the user explicitly wants to keep. Default profile follows GDPR data minimization: own conversations only (Tells, Party, FC, Linkshells, Cross-World Linkshells, Alliance, ExtraChat). Public chat (Say/Shout/Yell), Novice Network, NPC dialogue and system logs are dropped by default. The filter sits inside MessageStore.UpsertMessage so any current or future write path is covered uniformly. Configuration provides an IsAllowedForStorage(ChatType) helper plus a "persist unknown channels" failsafe (default off) for ChatTypes added by future patches. A new Privacy settings tab exposes the whitelist as grouped checkboxes with three preset buttons (Privacy-First, Clear all, Select all). Configuration version bumps from 6 to 7; existing users are migrated to the Privacy-First defaults on first load and notified once via the Dalamud notification manager. Also includes a small .env.example and gitignore hygiene for local development setup.
This commit is contained in:
@@ -33,10 +33,27 @@ public class ConfigKeyBind
|
||||
[Serializable]
|
||||
public class Configuration : IPluginConfiguration
|
||||
{
|
||||
private const int LatestVersion = 6;
|
||||
private const int LatestVersion = 7;
|
||||
|
||||
public int Version { get; set; } = LatestVersion;
|
||||
|
||||
// Hellion Chat — Privacy filter (DSGVO Art. 25 Privacy by Default).
|
||||
// Master-switch defaults to true; set false to restore upstream behavior.
|
||||
public bool PrivacyFilterEnabled = true;
|
||||
// Empty set means the migration has not run yet — see Plugin.cs v6→v7.
|
||||
public HashSet<ChatType> PrivacyPersistChannels = [];
|
||||
// Failsafe for ChatTypes added by future FFXIV patches we don't know about.
|
||||
public bool PrivacyPersistUnknownChannels;
|
||||
|
||||
public bool IsAllowedForStorage(ChatType type)
|
||||
{
|
||||
if (!PrivacyFilterEnabled)
|
||||
return true;
|
||||
if (PrivacyPersistChannels.Contains(type))
|
||||
return true;
|
||||
return PrivacyPersistUnknownChannels;
|
||||
}
|
||||
|
||||
public bool HideChat = true;
|
||||
public bool HideDuringCutscenes = true;
|
||||
public bool HideWhenNotLoggedIn = true;
|
||||
@@ -195,6 +212,10 @@ public class Configuration : IPluginConfiguration
|
||||
WebinterfacePassword = other.WebinterfacePassword;
|
||||
WebinterfacePort = other.WebinterfacePort;
|
||||
WebinterfaceMaxLinesToSend = other.WebinterfaceMaxLinesToSend;
|
||||
|
||||
PrivacyFilterEnabled = other.PrivacyFilterEnabled;
|
||||
PrivacyPersistChannels = [..other.PrivacyPersistChannels];
|
||||
PrivacyPersistUnknownChannels = other.PrivacyPersistUnknownChannels;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user