createPrivateChat - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.coroutines / createPrivateChat

createPrivateChat

suspend fun TelegramFlow.createPrivateChat(userId: Int, force: Boolean): Chat

Suspend function, which returns an existing chat corresponding to a given user.

Parameters

userId - User identifier.

force - If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect.

Return Chat A chat. (Can be a private chat, basic group, supergroup, or secret chat.)