SendMessageUseCaseImpl

class SendMessageUseCaseImpl(nodeRepository: NodeRepository, packetRepository: PacketRepository, radioController: RadioController, homoglyphEncodingPrefs: HomoglyphPrefs, messageQueue: MessageQueue, analytics: PlatformAnalytics) : SendMessageUseCase(source)

Constructors

Link copied to clipboard
constructor(nodeRepository: NodeRepository, packetRepository: PacketRepository, radioController: RadioController, homoglyphEncodingPrefs: HomoglyphPrefs, messageQueue: MessageQueue, analytics: PlatformAnalytics)

Functions

Link copied to clipboard
open suspend operator override fun invoke(text: String, contactKey: String = "0", replyId: Int? = null): SendMessageOutcome

Executes the send message workflow.

Link copied to clipboard
open suspend override fun resend(uuid: Long, contactKey: String): SendMessageOutcome

Sends the stored message uuid again in place. The row keeps its uuid, timestamp, text and reply link and gets a fresh packet id and a queued status, so it stays where it was in the conversation and delivery status updates on it. A refused or failed send leaves the row as it was.