MessageSender
public class MessageSender
Manage sending messages
-
init with a
SignalClientDeclaration
Swift
public init(signalClient: SignalClient)
-
Transmit a
Sendable(i.e., a message) to a list ofMessageRecipient(specific devices and/or users’ whole collections of devices)Note: References to self (our specific
.device, or all of our devices in the case of our.user) are ignored in the list of recipients.Declaration
Swift
public func send(_ sendable: Sendable, to recipients: [MessageRecipient] = [], syncToSelf: Bool = true) -> Promise<[TransmissionInfo]>Parameters
sendablethe
Sendablemessagerecipientsthe list of recipients (optional) – empty means only send sync to self
syncToSelfwhether or not to sync to our other devices (defaults to
true)Return Value
a
Promise<[TransmissionInfo]>with information about the transmission to each of the recipients -
Send a sync message of a list of
SyncReadReceiptto our other devices to indicate specific messages having been read.Declaration
Swift
public func sendSyncReadReceipts(_ receipts: [SyncReadReceipt]) -> Promise<TransmissionInfo>Parameters
receiptsthe list of read-receipts for messages from others
Return Value
a
Promise<TransmissionInfo>indicating the success of the transmission
-
Information from the Signal server about a message transmission activity
See moreDeclaration
Swift
public class TransmissionInfo : CustomStringConvertible
View on GitHub
Install in Dash
MessageSender Class Reference