...
This commit is contained in:
@@ -3,22 +3,29 @@ import base
|
||||
|
||||
import freeflowuniverse.herolib.data.ourtime
|
||||
|
||||
// our attempt to make a message object which can be used for email as well as chat
|
||||
// MessagePriority represents the priority level of a message
|
||||
pub enum MessagePriority {
|
||||
low
|
||||
normal
|
||||
high
|
||||
}
|
||||
|
||||
// Message represents an email message that can be used for email as well as chat
|
||||
pub struct Message {
|
||||
base.Base // Base struct for common fields
|
||||
pub mut:
|
||||
// Database ID
|
||||
id u32 // Database ID (assigned by DBHandler)
|
||||
message_id string // Unique identifier for the email
|
||||
folder string // The folder this email belongs to (inbox, sent, drafts, etc.)
|
||||
message string // The email body content
|
||||
attachments []Attachment // Any file attachments
|
||||
send_time ourtime.OurTime
|
||||
|
||||
date i64 // Unix timestamp when the email was sent/received
|
||||
size u32 // Size of the message in bytes
|
||||
read bool // Whether the email has been read
|
||||
flagged bool // Whether the email has been flagged/starred
|
||||
conversation_id string // ID for grouping messages in the same thread
|
||||
folder string // The folder this email belongs to (inbox, sent, drafts, etc.)
|
||||
labels []u16 //from circle config called message (config with name message)
|
||||
message string // The email body content
|
||||
attachments []u32// Any file attachment, is in circle
|
||||
send_time ourtime.OurTime
|
||||
scheduled_send ourtime.OurTime // Time to send if scheduled
|
||||
size u32 // Size of the message in bytes
|
||||
read bool // Whether the email has been read
|
||||
flagged bool // Whether the email has been flagged/starred
|
||||
priority MessagePriority // Priority level
|
||||
|
||||
// Header information
|
||||
subject string
|
||||
@@ -28,13 +35,6 @@ pub mut:
|
||||
to []u32
|
||||
cc []u32
|
||||
bcc []u32
|
||||
in_reply_to u32
|
||||
}
|
||||
|
||||
// Attachment represents an email attachment
|
||||
pub struct Attachment {
|
||||
pub mut:
|
||||
filename string
|
||||
content_type string
|
||||
hash string // Hash of the attachment data
|
||||
in_reply_to u32
|
||||
draft bool // Whether this is a draft message
|
||||
}
|
||||
|
Reference in New Issue
Block a user