fix: use seen insstead of read flag
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user