LocalMessage
struct LocalMessage : Identifiable, Hashable
Local messages are messages meant to be stored on device.
Local messages act just like a regular message but with more detailed information. This is done to limit the size of the message sent between devices while upholding information in a single struct on the receiving device.
See MessageModel.swift
-
Some id which uniquely identifies the message.
Declaration
Swift
var id: Int32
-
The author who wrote the message.
Declaration
Swift
var sender: String
-
Who the message is meant for
Declaration
Swift
var receiver: String
-
The actual content of the message.
Declaration
Swift
var text: String
-
The time of receival
Declaration
Swift
var date: Date
-
The current status of the message.
Declaration
Swift
var status: Status
-
Change message status to delivered
Declaration
Swift
mutating func messageDelivered()
-
Change message status to read
Declaration
Swift
mutating func messageRead()
-
Change message status to failed
Declaration
Swift
mutating func messageFailed()
-
Change message status to received-read-sent.
Declaration
Swift
mutating func messageReceivedReadSent()