Package-level declarations

Types

persist a local system message to all conversations

Link copied to clipboard
class DeleteMessageUseCase(messageRepository: MessageRepository, assetRepository: AssetRepository, slowSyncRepository: SlowSyncRepository, messageSender: MessageSender, selfUserId: UserId, currentClientIdProvider: CurrentClientIdProvider, selfConversationIdProvider: SelfConversationIdProvider, deleteAttachments: DeleteMessageAttachmentsUseCase, persistenceEventHookNotifier: PersistenceEventHookNotifier, dispatcher: KaliumDispatcher = KaliumDispatcherImpl)

Deletes a message from the conversation

Link copied to clipboard
internal object EditMessageBuilder
internal class FetchOlderNomadMessagesByConversationUseCaseImpl(dispatcher: KaliumDispatcher = KaliumDispatcherImpl, messageRepository: MessageRepository) : FetchOlderNomadMessagesByConversationUseCase
Link copied to clipboard
class GetMessageByIdUseCase(messageRepository: MessageRepository, dispatchers: KaliumDispatcher = KaliumDispatcherImpl)

Provides a way to get a full message using its ConversationId and message ID coordinates.

Link copied to clipboard
class GetNextAudioMessageInConversationUseCase(messageRepository: MessageRepository, dispatchers: KaliumDispatcher = KaliumDispatcherImpl)

Provides a way to get a messageId of next AudioMessage after messageId in ConversationId conversation.

Link copied to clipboard

Get notifications for the current user

Link copied to clipboard
internal class GetNotificationsUseCaseImpl(connectionRepository: ConnectionRepository, messageRepository: MessageRepository, notificationEventsManager: NotificationEventsManager, incrementalSyncRepository: IncrementalSyncRepository, localNotificationMessageMapper: LocalNotificationMessageMapper = MapperProvider.localNotificationMessageMapper()) : GetNotificationsUseCase
class GetPaginatedFlowOfMessagesByConversationUseCase(dispatcher: KaliumDispatcher, messageRepository: MessageRepository)

This use case will observe and return a flow of paginated messages for a given conversation.

class GetPaginatedFlowOfMessagesBySearchQueryAndConversationIdUseCase(dispatcher: KaliumDispatcher, messageRepository: MessageRepository)

This use case will observe and return a flow of paginated searched messages for a given conversation.

Link copied to clipboard
class GetRecentMessagesUseCase(messageRepository: MessageRepository, slowSyncRepository: SlowSyncRepository)

Gets the recent messages from the conversation

Gets the Selected Message Position from Search

internal class GetSearchedConversationMessagePositionUseCaseImpl(messageRepository: MessageRepository, dispatcher: KaliumDispatcher = KaliumDispatcherImpl) : GetSearchedConversationMessagePositionUseCase
Link copied to clipboard
class GetSenderNameByMessageIdUseCase(messageRepository: MessageRepository, dispatchers: KaliumDispatcher = KaliumDispatcherImpl)

Provides a way to get a name of user that sent a message using its ConversationId and message ID coordinates.

Link copied to clipboard

Marks conversations in one or all conversations as notified, so the notifications for these messages won't show up again.

Link copied to clipboard
internal interface MessageEnvelopeCreator
Link copied to clipboard
internal class MessageEnvelopeCreatorImpl(conversationRepository: ConversationRepository, legalHoldStatusMapper: LegalHoldStatusMapper, selfUserId: UserId, protoContentMapper: ProtoContentMapper = MapperProvider.protoContentMapper(selfUserId = selfUserId), idMapper: IdMapper = MapperProvider.idMapper()) : MessageEnvelopeCreator
Link copied to clipboard

Common result type for message operations (sending, editing, deleting) that return Unit on success. This provides a Swift-friendly API while maintaining backward compatibility with Either for internal use.

Link copied to clipboard
class MessageScope(notificationEventsManager: NotificationEventsManager, connectionRepository: ConnectionRepository, messageDraftRepository: MessageDraftRepository, selfUserId: QualifiedID, currentClientIdProvider: CurrentClientIdProvider, selfConversationIdProvider: SelfConversationIdProvider, val messageRepository: MessageRepository, conversationRepository: ConversationRepository, attachmentsRepository: Lazy<MessageAttachmentDraftRepository>, mlsConversationRepository: MLSConversationRepository, clientRepository: ClientRepository, clientRemoteRepository: ClientRemoteRepository, preKeyRepository: PreKeyRepository, userRepository: UserRepository, assetRepository: AssetRepository, reactionRepository: ReactionRepository, receiptRepository: ReceiptRepository, syncManager: SyncManager, slowSyncRepository: SlowSyncRepository, messageSendingScheduler: MessageSendingScheduler, audioNormalizedLoudnessScheduler: AudioNormalizedLoudnessScheduler, userPropertyRepository: UserPropertyRepository, incrementalSyncRepository: IncrementalSyncRepository, kaliumFileSystem: KaliumFileSystem, protoContentMapper: ProtoContentMapper, observeSelfDeletingMessages: ObserveSelfDeletionTimerSettingsForConversationUseCase, messageMetadataRepository: MessageMetadataRepository, staleEpochVerifier: StaleEpochVerifier, legalHoldHandler: LegalHoldHandler, observeFileSharingStatusUseCase: ObserveFileSharingStatusUseCase, getMessageAttachmentsUseCase: Lazy<GetMessageAttachmentsUseCase>, publishAttachmentsUseCase: Lazy<PublishAttachmentsUseCase>, removeAttachmentDraftsUseCase: Lazy<RemoveAttachmentDraftsUseCase>, deleteMessageAttachmentsUseCase: Lazy<DeleteMessageAttachmentsUseCase>, fetchConversationUseCase: FetchConversationUseCase, transactionProvider: CryptoTransactionProvider, compositeMessageRepository: CompositeMessageRepository, joinExistingConversationUseCaseProvider: () -> JoinExistingMLSConversationUseCase, audioNormalizedLoudnessBuilder: AudioNormalizedLoudnessBuilder, mlsMissingUsersMessageRejectionHandlerProvider: () -> MLSMissingUsersMessageRejectionHandler, persistenceEventHookNotifier: PersistenceEventHookNotifier, linkPreviewEnabled: Boolean, scope: CoroutineScope, kaliumConfigs: KaliumConfigs, kaliumLogger: KaliumLogger, val dispatcher: KaliumDispatcher, legalHoldStatusMapper: LegalHoldStatusMapper)
Link copied to clipboard
internal class MessageSenderImpl(messageRepository: MessageRepository, conversationRepository: ConversationRepository, syncManager: SyncManager, messageSendFailureHandler: MessageSendFailureHandler, legalHoldHandler: LegalHoldHandler, sessionEstablisher: SessionEstablisher, messageEnvelopeCreator: MessageEnvelopeCreator, mlsMessageCreator: MLSMessageCreator, messageSendingInterceptor: MessageSendingInterceptor, userRepository: UserRepository, staleEpochVerifier: StaleEpochVerifier, transactionProvider: CryptoTransactionProvider, mlsMissingUsersMessageRejectionHandler: MLSMissingUsersMessageRejectionHandler, enqueueSelfDeletion: (Message, Message.ExpirationData) -> Unit, scope: CoroutineScope) : MessageSender
Link copied to clipboard
internal interface MessageSendFailureHandler
Link copied to clipboard
internal class MessageSendFailureHandlerImpl(userRepository: UserRepository, clientRepository: ClientRepository, clientRemoteRepository: ClientRemoteRepository, messageRepository: MessageRepository, messageSendingScheduler: MessageSendingScheduler, fetchConversation: FetchConversationUseCase, clientMapper: ClientMapper = MapperProvider.clientMapper()) : MessageSendFailureHandler
Link copied to clipboard
internal interface MessageSendingInterceptor
Link copied to clipboard
internal class MessageSendingInterceptorImpl(messageContentEncoder: MessageContentEncoder, messageRepository: MessageRepository) : MessageSendingInterceptor
Link copied to clipboard
Link copied to clipboard
internal interface MLSMessageCreator
Link copied to clipboard
internal class MLSMessageCreatorImpl(conversationRepository: ConversationRepository, legalHoldStatusMapper: LegalHoldStatusMapper, mlsConversationRepository: MLSConversationRepository, joinExistingConversationUseCase: JoinExistingMLSConversationUseCase, selfUserId: UserId, protoContentMapper: ProtoContentMapper = MapperProvider.protoContentMapper(selfUserId = selfUserId), idMapper: IdMapper = MapperProvider.idMapper()) : MLSMessageCreator
Link copied to clipboard
class ObserveMessageByIdUseCase(messageRepository: MessageRepository, dispatchers: KaliumDispatcher = KaliumDispatcherImpl)

This use case will observe and return the Flow of Message for a specific ConversationId and messageId.

Link copied to clipboard

Use case to observe the reactions on a message

Link copied to clipboard

Use case to observe the receipts on a message

Link copied to clipboard
internal interface PendingProposalScheduler

Schedule pending MLS proposals in a conversation to be committed at a given date. The scheduling persisted and resumes automatically.

Link copied to clipboard
internal class PendingProposalSchedulerImpl(incrementalSyncRepository: IncrementalSyncRepository, mlsConversationRepository: Lazy<MLSConversationRepository>, subconversationRepository: Lazy<SubconversationRepository>, transactionProvider: CryptoTransactionProvider, kaliumDispatcher: KaliumDispatcher = KaliumDispatcherImpl, parentContext: CoroutineContext = SupervisorJob()) : PendingProposalScheduler
Link copied to clipboard
sealed class Result
Link copied to clipboard
class RetryFailedMessageUseCase(messageRepository: MessageRepository, assetRepository: AssetRepository, conversationRepository: ConversationRepository, attachmentsRepository: MessageAttachmentDraftRepository, persistMessage: PersistMessageUseCase, publishAttachments: PublishAttachmentsUseCase, scope: CoroutineScope, dispatcher: KaliumDispatcher, messageSender: MessageSender, updateAssetMessageTransferStatus: UpdateAssetMessageTransferStatusUseCase, getAssetMessageTransferStatusUseCase: GetAssetMessageTransferStatusUseCase, messageSendFailureHandler: MessageSendFailureHandler)
Link copied to clipboard

Use case for searching messages across all conversations by text content.

Link copied to clipboard
internal class SearchMessagesGloballyUseCaseImpl(messageRepository: MessageRepository, dispatcher: KaliumDispatcher = KaliumDispatcherImpl) : SearchMessagesGloballyUseCase
Link copied to clipboard

Use case for searching messages in a conversation by text content.

Link copied to clipboard
internal class SearchMessagesInConversationUseCaseImpl(messageRepository: MessageRepository, dispatcher: KaliumDispatcher = KaliumDispatcherImpl) : SearchMessagesInConversationUseCase
Link copied to clipboard
class SendEditMultipartMessageUseCase(messageRepository: MessageRepository, selfUserId: QualifiedID, provideClientId: CurrentClientIdProvider, slowSyncRepository: SlowSyncRepository, messageSender: MessageSender, messageSendFailureHandler: MessageSendFailureHandler, getMessageAttachments: GetMessageAttachmentsUseCase, dispatchers: KaliumDispatcher = KaliumDispatcherImpl)

Edits a multipart message

Link copied to clipboard
class SendEditTextMessageUseCase(messageRepository: MessageRepository, selfUserId: QualifiedID, provideClientId: CurrentClientIdProvider, slowSyncRepository: SlowSyncRepository, messageSender: MessageSender, messageSendFailureHandler: MessageSendFailureHandler, pendingMessagesEnabled: Boolean = true, dispatchers: KaliumDispatcher = KaliumDispatcherImpl)

Edits a text message

Link copied to clipboard
class SendKnockUseCase(persistMessage: PersistMessageUseCase, selfUserId: QualifiedID, currentClientIdProvider: CurrentClientIdProvider, slowSyncRepository: SlowSyncRepository, messageSender: MessageSender, messageSendFailureHandler: MessageSendFailureHandler, selfDeleteTimer: ObserveSelfDeletionTimerSettingsForConversationUseCase, dispatcher: KaliumDispatcher = KaliumDispatcherImpl)

Sending a ping/knock message to a conversation

Link copied to clipboard
class SendLocationUseCase(persistMessage: PersistMessageUseCase, selfUserId: QualifiedID, currentClientIdProvider: CurrentClientIdProvider, slowSyncRepository: SlowSyncRepository, messageSender: MessageSender, messageSendFailureHandler: MessageSendFailureHandler, selfDeleteTimer: ObserveSelfDeletionTimerSettingsForConversationUseCase, pendingMessagesEnabled: Boolean = true, dispatcher: KaliumDispatcher = KaliumDispatcherImpl)

Sending a location message to a conversation

Link copied to clipboard
class SendMultipartMessageUseCase(persistMessage: PersistMessageUseCase, selfUserId: QualifiedID, provideClientId: CurrentClientIdProvider, assetDataSource: AssetRepository, slowSyncRepository: SlowSyncRepository, messageSender: MessageSender, messageSendFailureHandler: MessageSendFailureHandler, userPropertyRepository: UserPropertyRepository, conversationRepository: ConversationRepository, attachmentsRepository: MessageAttachmentDraftRepository, selfDeleteTimer: ObserveSelfDeletionTimerSettingsForConversationUseCase, publishAttachments: PublishAttachmentsUseCase, removeAttachmentDrafts: RemoveAttachmentDraftsUseCase, sendAssetMessage: ScheduleNewAssetMessageUseCase, dispatchers: KaliumDispatcher = KaliumDispatcherImpl, scope: CoroutineScope)

Use case to send a multipart message. Sends Multipart message with multiple attachments in conversations with Cell Feature enabled. For regular conversations, each attachment is sent as a separate Asset message.

Link copied to clipboard
class SendTextMessageUseCase(persistMessage: PersistMessageUseCase, selfUserId: QualifiedID, provideClientId: CurrentClientIdProvider, assetDataSource: AssetRepository, slowSyncRepository: SlowSyncRepository, messageSender: MessageSender, messageSendFailureHandler: MessageSendFailureHandler, userPropertyRepository: UserPropertyRepository, selfDeleteTimer: ObserveSelfDeletionTimerSettingsForConversationUseCase, dispatchers: KaliumDispatcher = KaliumDispatcherImpl, pendingMessagesEnabled: Boolean = true, scope: CoroutineScope)
Link copied to clipboard
internal interface SessionResetSender
Link copied to clipboard
internal class SessionResetSenderImpl(slowSyncRepository: SlowSyncRepository, selfUserId: QualifiedID, provideClientId: CurrentClientIdProvider, messageSender: MessageSender, dispatchers: KaliumDispatcher = KaliumDispatcherImpl) : SessionResetSender
Link copied to clipboard
internal interface StaleEpochVerifier
Link copied to clipboard
internal class StaleEpochVerifierImpl(systemMessageInserter: SystemMessageInserter, fetchConversationUseCase: FetchConversationUseCase, conversationRepository: ConversationRepository, subconversationRepository: SubconversationRepository, mlsConversationRepository: MLSConversationRepository, joinExistingMLSConversation: JoinExistingMLSConversationUseCase) : StaleEpochVerifier
Link copied to clipboard
Link copied to clipboard
class ToggleReactionUseCase(currentClientIdProvider: CurrentClientIdProvider, userId: UserId, slowSyncRepository: SlowSyncRepository, reactionRepository: ReactionRepository, messageSender: MessageSender, persistenceEventHookNotifier: PersistenceEventHookNotifier, dispatcher: KaliumDispatcher = KaliumDispatcherImpl)

Properties

Functions

Link copied to clipboard
internal fun AttachmentDraft.metadata(): AssetContent.AssetMetadata?