Package-level declarations

Types

Link copied to clipboard
sealed interface DownloadGifResult
Link copied to clipboard

Downloads a GIF's Gif.original rendition from Giphy's CDN to a temporary file. Fails if the response isn't a GIF file (GIF87a or GIF89a header), so nothing else is sent as image/gif. Show that file as the preview and pass it to SendGifMessageUseCase, so the GIF is downloaded only once.

Link copied to clipboard
internal class DownloadGifUseCaseImpl(giphyRepository: GiphyRepository) : DownloadGifUseCase
Link copied to clipboard
sealed interface GetGifsResult
Link copied to clipboard

Suggests Giphy search terms that complete invoke's query.

Link copied to clipboard
Link copied to clipboard

Gets Giphy's trending GIFs rated pg or milder.

Link copied to clipboard
Link copied to clipboard
class GiphyScope(giphyRepository: GiphyRepository, sendTextMessage: SendTextMessageUseCase, sendAssetMessage: ScheduleNewAssetMessageUseCase, observeFileSharingStatus: ObserveFileSharingStatusUseCase, validateAssetFileType: ValidateAssetFileTypeUseCase, scope: CoroutineScope)

GIF search and sending through the backend's Giphy proxy. Search requests go through the Wire backend; GIF files load directly from Giphy's CDN.

Link copied to clipboard

Searches Giphy for GIFs rated pg or milder.

Link copied to clipboard
internal class SearchGifsUseCaseImpl(giphyRepository: GiphyRepository) : SearchGifsUseCase
Link copied to clipboard
sealed interface SendGifMessageResult
Link copied to clipboard

Sends a downloaded GIF the way web and the old iOS app do: an optional caption text message, then the GIF as an image/gif asset. Receivers need nothing new. Both messages follow the conversation's self-deleting timer.

Link copied to clipboard
internal class SendGifMessageUseCaseImpl(sendText: suspend (ConversationId, text: String, quotedMessageId: String?) -> MessageOperationResult, sendAssetMessage: ScheduleNewAssetMessageUseCase, observeFileSharingStatus: ObserveFileSharingStatusUseCase, validateAssetFileType: ValidateAssetFileTypeUseCase, scope: CoroutineScope) : SendGifMessageUseCase

Functions

Link copied to clipboard
internal fun Either<NetworkFailure, GifPage>.toGetGifsResult(): GetGifsResult

A 404 means the backend has no Giphy proxy.