aries / net.globalid.aries.features.basicmessage / BasicMessageService / sendMessage

sendMessage

abstract fun sendMessage(agent: Agent, message: String, connectionContext: ConnectionContext): Single<Pair<BasicMessageRecord, Throwable?>>

Creates a message for the given connection context (should be a connection ID) and sends it. If sending is unsuccessful, the message record is still stored in the wallet. If sending is unsuccessful, we still signal success, but with a non-null throwable in the returned pair.

Parameters

agent - agent to send message for

message - the message contents

connectionContext - the connection context for the created message

Return
Single of BasicMessageRecord and nullable Throwable, the record representing the message and an error if one occurred during sending.