Message

data class Message(val uuid: Long, val receivedTime: Long, val node: Node, val text: String, val fromLocal: Boolean, val time: String, val meshTime: Long = 0, val read: Boolean, val status: MessageStatus?, val routingError: Int, val packetId: Int, val emojis: List<Reaction>, val snr: Float?, val rssi: Int?, val hopsAway: Int, val replyId: Int?, val originalMessage: Message? = null, val viaMqtt: Boolean = false, val relayNode: Int? = null, val relays: Int = 0, val filtered: Boolean = false, val transportMechanism: Int = 0, val xeddsaSigned: Boolean = false, val translatedText: String? = null, val showTranslated: Boolean = false)(source)

Constructors

Link copied to clipboard
constructor(uuid: Long, receivedTime: Long, node: Node, text: String, fromLocal: Boolean, time: String, meshTime: Long = 0, read: Boolean, status: MessageStatus?, routingError: Int, packetId: Int, emojis: List<Reaction>, snr: Float?, rssi: Int?, hopsAway: Int, replyId: Int?, originalMessage: Message? = null, viaMqtt: Boolean = false, relayNode: Int? = null, relays: Int = 0, filtered: Boolean = false, transportMechanism: Int = 0, xeddsaSigned: Boolean = false, translatedText: String? = null, showTranslated: Boolean = false)

Properties

Link copied to clipboard

Epoch millis behind the displayed time: mesh time when the radio stamped one, otherwise the local receivedTime. Use this for anything time-based the user can see, so an offline backlog sync — where every packet shares one receipt instant — still reads as the conversation actually happened.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Mesh time in epoch millis (the packet's rx_time) — the instant time renders. 0 when the radio never stamped one (the packet carried no arrival time, or an old-firmware 0); read displayTime instead of this field so that case falls back to receivedTime.

Link copied to clipboard
val node: Node
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val relays: Int
Link copied to clipboard
val replyId: Int?
Link copied to clipboard
Link copied to clipboard
val rssi: Int?

Received signal strength, or null when the radio did not report one. 0 dBm is a valid reading.

Link copied to clipboard

Whether the bubble currently displays translatedText instead of text.

Link copied to clipboard
val snr: Float?

Signal-to-noise ratio in dB, or null when the packet carried no measurement. 0 dB is a valid reading.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

On-device translation of text, persisted so the user can toggle back to it without re-translating.

Link copied to clipboard

The transport mechanism this packet arrived over (see MeshPacket.TransportMechanism).

Link copied to clipboard
val uuid: Long
Link copied to clipboard
Link copied to clipboard

True when the radio verified this broadcast's XEdDSA signature (MeshPacket.xeddsa_signed).

Functions

Link copied to clipboard
fun displayedText(searching: Boolean = false): String

The text the UI displays (and copies): the persisted translation when showTranslated is set, except while searching — search matches and highlights apply to the original text.

Link copied to clipboard
fun getStatusDetailRes(): StringResource?
Link copied to clipboard
fun getStatusStringRes(isDirectMessage: Boolean = false): Pair<StringResource, StringResource>
Link copied to clipboard
fun isStatusRetryable(isDirectMessage: Boolean = false): Boolean