fix: use seen insstead of read flag

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-06-25 23:38:47 -04:00
parent 556ff7d708
commit 1d38f6bf16
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -119,19 +119,19 @@ export class MessageObject implements MessageModelInterface {
return this._data.attachments ? this._data.attachments.map(att => new MessagePartObject(att)) : []; return this._data.attachments ? this._data.attachments.map(att => new MessagePartObject(att)) : [];
} }
get flags(): { read?: boolean; flagged?: boolean; answered?: boolean; draft?: boolean } | {} { get flags(): { seen?: boolean; flagged?: boolean; answered?: boolean; draft?: boolean } | {} {
return clonePlain(this._data.flags ?? {}); return clonePlain(this._data.flags ?? {});
} }
// this should be moved to a mutable object, but for now we can allow it here for convenience // this should be moved to a mutable object, but for now we can allow it here for convenience
set flags(value: { read?: boolean; flagged?: boolean; answered?: boolean; draft?: boolean }) { set flags(value: { seen?: boolean; flagged?: boolean; answered?: boolean; draft?: boolean }) {
this._data.flags = clonePlain(value); this._data.flags = clonePlain(value);
} }
/** Helper methods */ /** Helper methods */
get isRead(): boolean { get isRead(): boolean {
return this._data.flags?.read ?? false; return this._data.flags?.seen ?? false;
} }
get isFlagged(): boolean { get isFlagged(): boolean {
+1 -1
View File
@@ -35,7 +35,7 @@ export interface MessageAddressInterface {
} }
export interface MessageFlagsInterface { export interface MessageFlagsInterface {
read?: boolean; seen?: boolean;
flagged?: boolean; flagged?: boolean;
answered?: boolean; answered?: boolean;
draft?: boolean; draft?: boolean;