Commit Graph

81 Commits

Author SHA1 Message Date
JonKazama-Hellion 68c7185cea Add per-channel message retention with daily background sweep
Privacy filter trimmed history "by what" — this adds the time axis.
Each ChatType gets its own retention window in days; channels
without an explicit override fall back to a configurable global
default. The master switch defaults to OFF: the plugin never
deletes history without explicit user consent.

MessageStore.DeleteByRetentionPolicy builds an OR'd WHERE clause
over (ChatType = X AND Date < cutoff_X) plus a NOT IN catch-all
for the global default, hard-deletes matches, and only runs VACUUM
when something was actually removed.

Plugin.RunRetentionSweepIfDue runs at most once per 24 hours on a
background thread (off the load path) and persists the timestamp
so subsequent restarts skip the sweep until enough time has
passed. The Privacy tab gains a retention section with the master
switch, default-days input, per-channel override tree, reset
buttons, and a Ctrl+Shift "apply now" action that mirrors the
auto-sweep but on demand.

Spec defaults: Tells 365 days, own-conversation channels (Party,
Cross-Party, Alliance, PvP Team, FC, Linkshells 1-8, Cross-World
Linkshells 1-8, ExtraChat 1-8) 90 days, fallback 30 days.
2026-05-01 18:47:31 +02:00
JonKazama-Hellion f0d6d64666 Migrate from ChatTwo layout at file level, not directory level
The original migration skipped the database move whenever
pluginConfigs/HellionChat already existed. In practice that
directory is materialised by Dalamud before our plugin constructor
runs, so the check was effectively always true and the legacy
chat-sqlite.db plus the EmoteCacheV1 directory stayed behind.

Walk the legacy directory entry by entry instead. Move every file
or subdirectory whose name is not already present on the target
side, then delete the legacy directory if it ends up empty. This
handles both fresh installs and the realistic case where Dalamud
has pre-created an empty config directory for the new plugin.
2026-05-01 18:40:06 +02:00
JonKazama-Hellion 465aadbb1a Brand the fork as Hellion Chat with independent plugin state
Switch the assembly name to HellionChat so Dalamud uses
pluginConfigs/HellionChat for our config file and database
directory, instead of sharing those locations with the upstream
Chat 2 plugin. Code namespace stays ChatTwo.* so upstream
cherry-picks apply cleanly.

Rename the DalamudPackager manifest to HellionChat.yaml with
fork-specific name, author, repo URL, description, tags and
changelog. Plugin.PluginName becomes "Hellion Chat".

Add a one-shot migration in the plugin constructor that runs
before GetPluginConfig: if pluginConfigs/ChatTwo.json or the
ChatTwo/ directory exist and our equivalents don't, move them
into the HellionChat layout. Idempotent: only fires on the first
load where legacy paths are present and ours are not.
2026-05-01 18:26:11 +02:00
JonKazama-Hellion 1ad5cb3164 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.
2026-05-01 18:20:09 +02:00
Infi 33c922aaf7 - Potential fix for null ref error
- Add logging around migration
2026-04-30 22:27:23 +02:00
Infi b4cb8b25ec - API 15
- Migrate config for API 15
- Migrate database for API 15
- Allow usage of new target source
- Implement first tell target option
2026-04-30 02:59:58 +02:00
Infi df0773ac65 - Implement message history export to text file 2026-04-10 22:17:37 +02:00
Infi c424311b24 - Check auto translation for commands and execute them instead of sending
- Plugin commands trigger the command helper window now
- Fix auto translation with empty text appearing
- Switch up all dalamud payload usage to ROSS if possible
- Prepare 7.5 changes
- Cleanup
2026-04-08 21:15:28 +02:00
Infi 4f9a6cd5be - API 14 2025-12-19 06:49:18 +01:00
Keda a6a93ed241 Add typing state IPC integration for enhanced Chat2 input handling 2025-11-15 00:17:39 +01:00
Infi 94b345c6a3 First implementation of sveltekit for webinterface 2025-09-20 16:07:46 +02:00
Infi efddaf30ad - API 13 2025-08-06 22:24:45 +02:00
Infi cb8abc9ed6 - Implement independent hide condition for popouts (closes #124) 2024-12-14 16:39:36 +01:00
Infi 3cfe65d2d4 - More ImRaii
- Cleanup
- Spanish, French, Dutch, Chinese loc update
2024-11-21 11:58:22 +01:00
Infi 1a1995759a - Handle NBSP payloads
- Use ingame version of axis font
2024-11-21 08:34:24 +01:00
Infi bf27d3e853 Final API11 updates and new channel switcher 2024-11-16 21:06:35 +01:00
Infi bf446c5511 Fix load exception 2024-08-28 18:22:44 +02:00
Infi f6531907a4 - Partially implement tab switch
- Better support character switch
2024-08-28 18:18:20 +02:00
Infi 2ababa82b0 - Implement better start/stop for the webinterface
- Save session tokens between startups
2024-08-28 14:09:09 +02:00
Infi c9be7c9c2c Move to SSE from websocket 2024-08-24 16:49:56 +02:00
Infi 5e93732183 Add pre-testing version of the webinterface 2024-08-24 03:05:33 +02:00
Infi 9d6fcd2abe Fix #108 2024-08-14 14:21:27 +02:00
Infi c9902dc28b Switch to dalamuds texture cache 2024-07-25 15:57:21 +02:00
Infi 906eeb5095 Remove legacy migration 2024-07-25 15:33:05 +02:00
Infi 97654b1c53 Rewrite font handling, use dalamud font chooser 2024-07-23 20:46:38 +02:00
Infi 604a2cb482 Remove debug info 2024-07-01 23:56:24 +02:00
Infi 8bef8ec050 Remove debug logs 2024-06-30 09:29:11 +02:00
Infi f76f0e91d0 Update for 7.0, part 1 2024-06-30 05:07:11 +02:00
Infi 34b76cc853 Save ffxiv font to disk on first download 2024-06-10 22:15:37 +02:00
Dean Sheather 748a963acc Use ContentIdResolver hook 2024-05-26 01:09:33 +10:00
Dean Sheather e9ae8362f5 fix: fix sorting problems 2024-05-25 21:50:30 +10:00
Infi c2131eb07b Implement DBViewer 2024-05-22 14:53:30 +02:00
Infi 592892e45a - New option to limit minimum preview length
- New option only preview with parameters
- Improve preview drawing modes
- Prevent null ref on plugin load
2024-05-20 06:25:54 +02:00
Infi adacf63bc3 Fix compile error in release mode 2024-05-19 02:47:48 +02:00
Infi 3d9f5a2764 Use higher resolution emotes and remove old emote cache 2024-05-15 21:10:07 +02:00
Infi ef775b5a91 InputPreview prototype 2024-05-15 20:48:03 +02:00
Infi fa41d22cb8 Only load emote list if the user has them activated 2024-05-11 05:13:31 +02:00
Infi b7286b8010 Implement emotes part 2 2024-05-09 19:09:36 +02:00
Infi 5b30e54f65 More cleanup 2024-05-02 15:02:42 +02:00
Dean Sheather 477290ce7e Merge pull request #37
* chore: use threads for DB reading and writing
2024-05-02 14:42:50 +02:00
Infi a74cdcb899 Prevent vanilla tooltip for event item and implement #28 2024-04-30 03:49:53 +02:00
Infi 695fd997d7 Merge pull request #33
fix: add Races, Clans and Companion Actions to auto-translate
2024-04-29 19:23:43 +02:00
Infi 036bcec1e7 Add debugger window 2024-04-29 19:21:17 +02:00
Dean Sheather fdae6b1cd2 fix: add Races, Clans and Companion Actions to auto-translate
The Race, Tribe and BuddyAction sheets were skipped as the default
behavior was to include rows from `0..^0` if no range was specified in
the Completion sheet. That range would usually include everything, but
since the ranges were iterated over as integers there is no "last" index
so `^0` equals zero.

Also preloads the AutoTranslate cache on plugin load in a new thread to
avoid a hitch when sending the first message. This behavior is disabled
in DEBUG builds to make profiling easier.
2024-04-29 18:55:24 +10:00
Infi 8ab450aa3e Scale icons with font size 2024-04-22 16:44:48 +02:00
Infi 9bdfa58deb Implement some todos from #27 2024-04-21 23:16:49 +02:00
Dean Sheather fcdb5625f3 feat: add LiteDB => Sqlite importer 2024-04-22 02:43:48 +10:00
Dean Sheather bb6c6b0034 feat: replace LiteDB with Sqlite
- Replace LiteDB database engine with Sqlite
  Note: old databases will not be deleted
- Message duplication detection improvements
- Tolerate parse errors in release builds, log them
2024-04-20 21:18:51 +10:00
Dean Sheather a6decf97fb fix: close the database on plugin load failure 2024-04-18 21:56:05 +10:00
Infi 91a8dd942d Fix popout not being hidden 2024-04-17 22:25:06 +02:00