mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-06 08:06:47 +00:00
18 lines
397 B
Swift
18 lines
397 B
Swift
import Foundation
|
|
|
|
struct Email: Codable {
|
|
let id: String
|
|
let subject: String?
|
|
let preview: String?
|
|
let from: [EmailAddress]?
|
|
let receivedAt: String?
|
|
let mailboxIds: [String: Bool]?
|
|
|
|
func getSenderName() -> String? {
|
|
if (from == nil || from?.isEmpty == true) {
|
|
return nil
|
|
}
|
|
return from?.first?.name ?? from?.first?.email
|
|
}
|
|
}
|