TdLibMapper

Maps TDLib API objects onto the unified MessengerProtocol domain model.

Functions

Link copied to clipboard
fun accountIdFromConversation(conversationId: String): String?

UUID account ids contain hyphens; chat id follows the last underscore.

Link copied to clipboard
fun chatIdFromConversation(conversationId: String): Long?
Link copied to clipboard
fun conversationId(accountId: String, chatId: Long): String
Link copied to clipboard
fun deliveryState(msg: TdApi.Message): DeliveryState
Link copied to clipboard
fun messageBody(msg: TdApi.Message): String
fun messageBody(content: TdApi.MessageContent): String
Link copied to clipboard
fun messageId(conversationId: String, tdMessageId: Long): String
Link copied to clipboard
fun toConversation(accountId: String, chat: TdApi.Chat): Conversation
Link copied to clipboard
fun toMessage(accountId: String, msg: TdApi.Message): Message