kotlinx.telegram.flows - libtd-ktx

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


libtd-ktx / kotlinx.telegram.flows

Package kotlinx.telegram.flows

Contains Telegram API Updates wrapped in kotlin flow extensions.

Functions

activeNotificationsFlow emits groups [NotificationGroup[]] if contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update.fun TelegramFlow.activeNotificationsFlow(): Flow<Array<NotificationGroup>>
authorizationStateFlow emits AuthorizationState if the user authorization state has changed.fun TelegramFlow.authorizationStateFlow(): Flow<AuthorizationState>
basicGroupFlow emits BasicGroup if some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the client.fun TelegramFlow.basicGroupFlow(): Flow<BasicGroup>
basicGroupFullInfoFlow emits UpdateBasicGroupFullInfo if some data from basicGroupFullInfo has been changed.fun TelegramFlow.basicGroupFullInfoFlow(): Flow<UpdateBasicGroupFullInfo>
callFlow emits Call if new call was created or information about a call was updated.fun TelegramFlow.callFlow(): Flow<Call>
chatActionBarFlow emits UpdateChatActionBar if the chat action bar was changed.fun TelegramFlow.chatActionBarFlow(): Flow<UpdateChatActionBar>
chatChatListFlow emits UpdateChatChatList if the list to which the chat belongs was changed. This update is guaranteed to be sent only when chat.order == 0 and the current or the new chat list is null.fun TelegramFlow.chatChatListFlow(): Flow<UpdateChatChatList>
chatDefaultDisableNotificationFlow emits UpdateChatDefaultDisableNotification if the value of the default disableNotification parameter, used when a message is sent to the chat, was changed.fun TelegramFlow.chatDefaultDisableNotificationFlow(): Flow<UpdateChatDefaultDisableNotification>
chatDraftMessageFlow emits UpdateChatDraftMessage if a chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn’t be applied.fun TelegramFlow.chatDraftMessageFlow(): Flow<UpdateChatDraftMessage>
chatHasScheduledMessagesFlow emits UpdateChatHasScheduledMessages if a chat’s hasScheduledMessages field has changed.fun TelegramFlow.chatHasScheduledMessagesFlow(): Flow<UpdateChatHasScheduledMessages>
chatIsMarkedAsUnreadFlow emits UpdateChatIsMarkedAsUnread if a chat was marked as unread or was read.fun TelegramFlow.chatIsMarkedAsUnreadFlow(): Flow<UpdateChatIsMarkedAsUnread>
chatIsPinnedFlow emits UpdateChatIsPinned if a chat was pinned or unpinned.fun TelegramFlow.chatIsPinnedFlow(): Flow<UpdateChatIsPinned>
chatIsSponsoredFlow emits UpdateChatIsSponsored if a chat’s isSponsored field has changed.fun TelegramFlow.chatIsSponsoredFlow(): Flow<UpdateChatIsSponsored>
chatLastMessageFlow emits UpdateChatLastMessage if the last message of a chat was changed. If lastMessage is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case.fun TelegramFlow.chatLastMessageFlow(): Flow<UpdateChatLastMessage>
chatNotificationSettingsFlow emits UpdateChatNotificationSettings if notification settings for a chat were changed.fun TelegramFlow.chatNotificationSettingsFlow(): Flow<UpdateChatNotificationSettings>
chatOnlineMemberCountFlow emits UpdateChatOnlineMemberCount if the number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed.fun TelegramFlow.chatOnlineMemberCountFlow(): Flow<UpdateChatOnlineMemberCount>
chatOrderFlow emits UpdateChatOrder if the order of the chat in the chat list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned, updateChatDraftMessage, or updateChatIsSponsored might be sent.fun TelegramFlow.chatOrderFlow(): Flow<UpdateChatOrder>
chatPermissionsFlow emits UpdateChatPermissions if chat permissions was changed.fun TelegramFlow.chatPermissionsFlow(): Flow<UpdateChatPermissions>
chatPhotoFlow emits UpdateChatPhoto if a chat photo was changed.fun TelegramFlow.chatPhotoFlow(): Flow<UpdateChatPhoto>
chatPinnedMessageFlow emits UpdateChatPinnedMessage if the chat pinned message was changed.fun TelegramFlow.chatPinnedMessageFlow(): Flow<UpdateChatPinnedMessage>
chatReadInboxFlow emits UpdateChatReadInbox if incoming messages were read or number of unread messages has been changed.fun TelegramFlow.chatReadInboxFlow(): Flow<UpdateChatReadInbox>
chatReadOutboxFlow emits UpdateChatReadOutbox if outgoing messages were read.fun TelegramFlow.chatReadOutboxFlow(): Flow<UpdateChatReadOutbox>
chatReplyMarkupFlow emits UpdateChatReplyMarkup if the default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user.fun TelegramFlow.chatReplyMarkupFlow(): Flow<UpdateChatReplyMarkup>
chatTitleFlow emits UpdateChatTitle if the title of a chat was changed.fun TelegramFlow.chatTitleFlow(): Flow<UpdateChatTitle>
chatUnreadMentionCountFlow emits UpdateChatUnreadMentionCount if the chat unreadMentionCount has changed.fun TelegramFlow.chatUnreadMentionCountFlow(): Flow<UpdateChatUnreadMentionCount>
connectionStateFlow emits state ConnectionState if the connection state has changed.fun TelegramFlow.connectionStateFlow(): Flow<ConnectionState>
deleteMessagesFlow emits UpdateDeleteMessages if some messages were deleted.fun TelegramFlow.deleteMessagesFlow(): Flow<UpdateDeleteMessages>
favoriteStickersFlow emits stickerIds [Int[]] if the list of favorite stickers was updated.fun TelegramFlow.favoriteStickersFlow(): Flow<IntArray>
fileFlow emits File if information about a file was updated.fun TelegramFlow.fileFlow(): Flow<File>
fileGenerationStartFlow emits UpdateFileGenerationStart if the file generation process needs to be started by the client.fun TelegramFlow.fileGenerationStartFlow(): Flow<UpdateFileGenerationStart>
fileGenerationStopFlow emits generationId Long if file generation is no longer needed.fun TelegramFlow.fileGenerationStopFlow(): Flow<Long>
havePendingNotificationsFlow emits UpdateHavePendingNotifications if describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications.fun TelegramFlow.havePendingNotificationsFlow(): Flow<UpdateHavePendingNotifications>
installedStickerSetsFlow emits UpdateInstalledStickerSets if the list of installed sticker sets was updated.fun TelegramFlow.installedStickerSetsFlow(): Flow<UpdateInstalledStickerSets>
languagePackStringsFlow emits UpdateLanguagePackStrings if some language pack strings have been updated.fun TelegramFlow.languagePackStringsFlow(): Flow<UpdateLanguagePackStrings>
messageContentFlow emits UpdateMessageContent if the message content has changed.fun TelegramFlow.messageContentFlow(): Flow<UpdateMessageContent>
messageContentOpenedFlow emits UpdateMessageContentOpened if the message content was opened. Updates voice note messages to &quot;listened&quot;, video note messages to &quot;viewed&quot; and starts the TTL timer for self-destructing messages.fun TelegramFlow.messageContentOpenedFlow(): Flow<UpdateMessageContentOpened>
messageEditedFlow emits UpdateMessageEdited if a message was edited. Changes in the message content will come in a separate updateMessageContent.fun TelegramFlow.messageEditedFlow(): Flow<UpdateMessageEdited>
messageLiveLocationViewedFlow emits UpdateMessageLiveLocationViewed if a message with a live location was viewed. When the update is received, the client is supposed to update the live location.fun TelegramFlow.messageLiveLocationViewedFlow(): Flow<UpdateMessageLiveLocationViewed>
messageMentionReadFlow emits UpdateMessageMentionRead if a message with an unread mention was read.fun TelegramFlow.messageMentionReadFlow(): Flow<UpdateMessageMentionRead>
messageSendAcknowledgedFlow emits UpdateMessageSendAcknowledged if a request to send a message has reached the Telegram server. This doesn’t mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option &quot;use_quick_ack&quot; is set to true. This update may be sent multiple times for the same message.fun TelegramFlow.messageSendAcknowledgedFlow(): Flow<UpdateMessageSendAcknowledged>
messageSendFailedFlow emits UpdateMessageSendFailed if a message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update.fun TelegramFlow.messageSendFailedFlow(): Flow<UpdateMessageSendFailed>
messageSendSucceededFlow emits UpdateMessageSendSucceeded if a message has been successfully sent.fun TelegramFlow.messageSendSucceededFlow(): Flow<UpdateMessageSendSucceeded>
messageViewsFlow emits UpdateMessageViews if the view count of the message has changed.fun TelegramFlow.messageViewsFlow(): Flow<UpdateMessageViews>
newCallbackQueryFlow emits UpdateNewCallbackQuery if a new incoming callback query; for bots only.fun TelegramFlow.newCallbackQueryFlow(): Flow<UpdateNewCallbackQuery>
newChatFlow emits Chat if a new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates.fun TelegramFlow.newChatFlow(): Flow<Chat>
newChosenInlineResultFlow emits UpdateNewChosenInlineResult if the user has chosen a result of an inline query; for bots only.fun TelegramFlow.newChosenInlineResultFlow(): Flow<UpdateNewChosenInlineResult>
newCustomEventFlow emits event String if a new incoming event; for bots only.fun TelegramFlow.newCustomEventFlow(): Flow<String>
newCustomQueryFlow emits UpdateNewCustomQuery if a new incoming query; for bots only.fun TelegramFlow.newCustomQueryFlow(): Flow<UpdateNewCustomQuery>
newInlineCallbackQueryFlow emits UpdateNewInlineCallbackQuery if a new incoming callback query from a message sent via a bot; for bots only.fun TelegramFlow.newInlineCallbackQueryFlow(): Flow<UpdateNewInlineCallbackQuery>
newInlineQueryFlow emits UpdateNewInlineQuery if a new incoming inline query; for bots only.fun TelegramFlow.newInlineQueryFlow(): Flow<UpdateNewInlineQuery>
newMessageFlow emits Message if a new message was received; can also be an outgoing message.fun TelegramFlow.newMessageFlow(): Flow<Message>
newPreCheckoutQueryFlow emits UpdateNewPreCheckoutQuery if a new incoming pre-checkout query; for bots only. Contains full information about a checkout.fun TelegramFlow.newPreCheckoutQueryFlow(): Flow<UpdateNewPreCheckoutQuery>
newShippingQueryFlow emits UpdateNewShippingQuery if a new incoming shipping query; for bots only. Only for invoices with flexible price.fun TelegramFlow.newShippingQueryFlow(): Flow<UpdateNewShippingQuery>
notificationFlow emits UpdateNotification if a notification was changed.fun TelegramFlow.notificationFlow(): Flow<UpdateNotification>
notificationGroupFlow emits UpdateNotificationGroup if a list of active notifications in a notification group has changed.fun TelegramFlow.notificationGroupFlow(): Flow<UpdateNotificationGroup>
optionFlow emits UpdateOption if an option changed its value.fun TelegramFlow.optionFlow(): Flow<UpdateOption>
pollAnswerFlow emits UpdatePollAnswer if a user changed the answer to a poll; for bots only.fun TelegramFlow.pollAnswerFlow(): Flow<UpdatePollAnswer>
pollFlow emits Poll if a poll was updated; for bots only.fun TelegramFlow.pollFlow(): Flow<Poll>
recentStickersFlow emits UpdateRecentStickers if the list of recently used stickers was updated.fun TelegramFlow.recentStickersFlow(): Flow<UpdateRecentStickers>
savedAnimationsFlow emits animationIds [Int[]] if the list of saved animations was updated.fun TelegramFlow.savedAnimationsFlow(): Flow<IntArray>
scopeNotificationSettingsFlow emits UpdateScopeNotificationSettings if notification settings for some type of chats were updated.fun TelegramFlow.scopeNotificationSettingsFlow(): Flow<UpdateScopeNotificationSettings>
secretChatFlow emits SecretChat if some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the client.fun TelegramFlow.secretChatFlow(): Flow<SecretChat>
selectedBackgroundFlow emits UpdateSelectedBackground if the selected background has changed.fun TelegramFlow.selectedBackgroundFlow(): Flow<UpdateSelectedBackground>
serviceNotificationFlow emits UpdateServiceNotification if service notification from the server. Upon receiving this the client must show a popup with the content of the notification.fun TelegramFlow.serviceNotificationFlow(): Flow<UpdateServiceNotification>
supergroupFlow emits Supergroup if some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the client.fun TelegramFlow.supergroupFlow(): Flow<Supergroup>
supergroupFullInfoFlow emits UpdateSupergroupFullInfo if some data from supergroupFullInfo has been changed.fun TelegramFlow.supergroupFullInfoFlow(): Flow<UpdateSupergroupFullInfo>
termsOfServiceFlow emits UpdateTermsOfService if new terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason &quot;Decline ToS update&quot;.fun TelegramFlow.termsOfServiceFlow(): Flow<UpdateTermsOfService>
trendingStickerSetsFlow emits StickerSets if the list of trending sticker sets was updated or some of them were viewed.fun TelegramFlow.trendingStickerSetsFlow(): Flow<StickerSets>
unreadChatCountFlow emits UpdateUnreadChatCount if number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used.fun TelegramFlow.unreadChatCountFlow(): Flow<UpdateUnreadChatCount>
unreadMessageCountFlow emits UpdateUnreadMessageCount if number of unread messages in a chat list has changed. This update is sent only if the message database is used.fun TelegramFlow.unreadMessageCountFlow(): Flow<UpdateUnreadMessageCount>
userChatActionFlow emits UpdateUserChatAction if user activity in the chat has changed.fun TelegramFlow.userChatActionFlow(): Flow<UpdateUserChatAction>
userFlow emits User if some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client.fun TelegramFlow.userFlow(): Flow<User>
userFullInfoFlow emits UpdateUserFullInfo if some data from userFullInfo has been changed.fun TelegramFlow.userFullInfoFlow(): Flow<UpdateUserFullInfo>
userPrivacySettingRulesFlow emits UpdateUserPrivacySettingRules if some privacy setting rules have been changed.fun TelegramFlow.userPrivacySettingRulesFlow(): Flow<UpdateUserPrivacySettingRules>
usersNearbyFlow emits usersNearby [ChatNearby[]] if list of users nearby has changed. The update is sent only 60 seconds after a successful searchChatsNearby request.fun TelegramFlow.usersNearbyFlow(): Flow<Array<ChatNearby>>
userStatusFlow emits UpdateUserStatus if the user went online or offline.fun TelegramFlow.userStatusFlow(): Flow<UpdateUserStatus>