MessageSendFailureHandlerImpl

class MessageSendFailureHandlerImpl(userRepository: UserRepository, clientRepository: ClientRepository, clientRemoteRepository: ClientRemoteRepository, messageRepository: MessageRepository, messageSendingScheduler: MessageSendingScheduler, conversationRepository: ConversationRepository, clientMapper: ClientMapper = MapperProvider.clientMapper()) : MessageSendFailureHandler

Constructors

Link copied to clipboard
internal constructor(userRepository: UserRepository, clientRepository: ClientRepository, clientRemoteRepository: ClientRemoteRepository, messageRepository: MessageRepository, messageSendingScheduler: MessageSendingScheduler, conversationRepository: ConversationRepository, clientMapper: ClientMapper = MapperProvider.clientMapper())

Functions

Link copied to clipboard
open suspend override fun handleClientsHaveChangedFailure(sendFailure: ProteusSendMessageFailure, conversationId: <Error class: unknown class>?): Either<CoreFailure, Unit>

Handle a failure when attempting to send a message due to contacts and/or clients being removed from conversation and/or added to them.

Link copied to clipboard
open suspend override fun handleFailureAndUpdateMessageStatus(failure: CoreFailure, conversationId: <Error class: unknown class>, messageId: String, messageType: String, scheduleResendIfNoNetwork: Boolean)

Handle a failure when attempting to send a message update the message status to FAILED or FAILED_REMOTELY depending on the resulted failure.