feat: add user preferences for online status and read receipts with real-time updates

- Introduced `showOnlineStatus` and `showReadReceipts` fields in the user schema and API.
- Integrated real-time status broadcasting in `UsersService` via `EventsGateway`.
- Updated repository and frontend user types to align with new fields.
- Enhanced user update handling to support dynamic preference changes for online status.
This commit is contained in:
Mathis HERRIOT
2026-01-29 18:18:52 +01:00
parent 7615ec670e
commit 5753477717
6 changed files with 42 additions and 1 deletions

View File

@@ -36,6 +36,8 @@ export const users = pgTable(
// Sécurité
twoFactorSecret: pgpEncrypted("two_factor_secret"),
isTwoFactorEnabled: boolean("is_two_factor_enabled").notNull().default(false),
showOnlineStatus: boolean("show_online_status").notNull().default(true),
showReadReceipts: boolean("show_read_receipts").notNull().default(true),
// RGPD & Conformité
termsVersion: varchar("terms_version", { length: 16 }), // Version des CGU acceptées