feat: add email recipient history to user settings and implement management in InboxDetailPage
Build and Push Multi-Platform Images / build-and-push (push) Successful in 36s

This commit is contained in:
2026-05-10 21:32:19 +02:00
parent 36322ae4c3
commit 351938aa5c
4 changed files with 56 additions and 3 deletions
@@ -31,4 +31,7 @@ export class UserSettings {
@Column({ type: 'int', nullable: true })
DefaultLabelTemplateId!: number | null;
@Column({ type: 'json', nullable: true })
EmailRecipientHistory!: string[] | null;
}
@@ -18,6 +18,7 @@ export interface UserSettingsDto {
smtpFromName: string | null;
mailSignatureHtml: string | null;
defaultLabelTemplateId: number | null;
emailRecipientHistory: string[] | null;
}
@Injectable()
@@ -80,6 +81,7 @@ export class UserSettingsService {
smtpFromName?: string | null;
mailSignatureHtml?: string | null;
defaultLabelTemplateId?: number | null;
emailRecipientHistory?: string[] | null;
},
): Promise<UserSettingsDto> {
let entity = await this.repo.findOne({ where: { UserId: userId } });
@@ -98,6 +100,7 @@ export class UserSettingsService {
if (data.smtpFromName !== undefined) entity.SmtpFromName = data.smtpFromName;
if (data.mailSignatureHtml !== undefined) entity.MailSignatureHtml = data.mailSignatureHtml;
if (data.defaultLabelTemplateId !== undefined) entity.DefaultLabelTemplateId = data.defaultLabelTemplateId;
if (data.emailRecipientHistory !== undefined) entity.EmailRecipientHistory = data.emailRecipientHistory;
await this.repo.save(entity);
return this.toDto(entity);
@@ -168,6 +171,7 @@ export class UserSettingsService {
smtpFromName: entity?.SmtpFromName ?? null,
mailSignatureHtml: entity?.MailSignatureHtml ?? null,
defaultLabelTemplateId: entity?.DefaultLabelTemplateId ?? null,
emailRecipientHistory: entity?.EmailRecipientHistory ?? null,
};
}
}