Skip to content

Commit

Permalink
Merge pull request #880 from InsanusMokrassar/15.3.0
Browse files Browse the repository at this point in the history
15.3.0
  • Loading branch information
InsanusMokrassar authored Aug 2, 2024
2 parents 83445dd + 8e3e447 commit f7cf37f
Show file tree
Hide file tree
Showing 15 changed files with 124 additions and 47 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# TelegramBotAPI changelog

## 15.3.0

**THIS UPDATE CONTAINS ADDING OF SUPPORT FOR BOTS API 7.8**

* `Core`:
* `OptionallyBusinessConnectionRequest` now extends `WithOptionalBusinessConnectionId`
* Add `hasMainWebApp` in `ExtendedBot`
* `API`:
* Add `BusinessConnectionId` to pin/unpin methods
* `WebApp`:
* Add `shareToStory` in `WebApp`



## 15.2.0

* `API`:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TelegramBotAPI [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-7.7-blue)](https://core.telegram.org/bots/api-changelog#july-7-2024)
# TelegramBotAPI [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-7.8-blue)](https://core.telegram.org/bots/api-changelog#july-31-2024)

| Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Mk&message=Docs&color=blue&logo=mkdocs)](https://docs.inmo.dev/tgbotapi/index.html) |
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ kotlin.incremental=true
kotlin.incremental.js=true

library_group=dev.inmo
library_version=15.2.0
library_version=15.3.0
23 changes: 12 additions & 11 deletions tgbotapi.api/api/tgbotapi.api.api
Original file line number Diff line number Diff line change
Expand Up @@ -667,12 +667,12 @@ public final class dev/inmo/tgbotapi/extensions/api/chat/modify/DeleteChatPhotoK
}

public final class dev/inmo/tgbotapi/extensions/api/chat/modify/PinChatMessageKt {
public static final fun pinChatMessage (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun pinChatMessage$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun pinChatMessage-SAUdIcY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun pinChatMessage-SAUdIcY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun pinChatMessage-SAUdIcY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun pinChatMessage-SAUdIcY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun pinChatMessage-iJMbh4A (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun pinChatMessage-iJMbh4A$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun pinChatMessage-rd3ngj0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun pinChatMessage-rd3ngj0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun pinChatMessage-rd3ngj0$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun pinChatMessage-rd3ngj0$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}

public final class dev/inmo/tgbotapi/extensions/api/chat/modify/SetChatDescriptionKt {
Expand Down Expand Up @@ -712,11 +712,12 @@ public final class dev/inmo/tgbotapi/extensions/api/chat/modify/UnpinAllChatMess
}

public final class dev/inmo/tgbotapi/extensions/api/chat/modify/UnpinChatMessageKt {
public static final fun unpinChatMessage (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun unpinChatMessage-MzaUNdY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun unpinChatMessage-MzaUNdY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/MessageId;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun unpinChatMessage-MzaUNdY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun unpinChatMessage-MzaUNdY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/MessageId;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun unpinChatMessage-DZdi6a4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun unpinChatMessage-DZdi6a4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun unpinChatMessage-DZdi6a4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun unpinChatMessage-DZdi6a4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun unpinChatMessage-efQd2eE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun unpinChatMessage-efQd2eE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}

public final class dev/inmo/tgbotapi/extensions/api/chat/stickers/DeleteChatStickerSetKt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@ import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.chat.modify.PinChatMessage
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageId
import dev.inmo.tgbotapi.types.businessConnectionId
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage

public suspend fun TelegramBot.pinChatMessage(
chatId: ChatIdentifier,
messageId: MessageId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false
): Boolean = execute(PinChatMessage(chatId, messageId, disableNotification))
): Boolean = execute(PinChatMessage(chatId, messageId, businessConnectionId, disableNotification))

public suspend fun TelegramBot.pinChatMessage(
chat: Chat,
messageId: MessageId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
disableNotification: Boolean = false
): Boolean = pinChatMessage(chat.id, messageId, disableNotification)
): Boolean = pinChatMessage(chat.id, messageId, businessConnectionId, disableNotification)

public suspend fun TelegramBot.pinChatMessage(
message: AccessibleMessage,
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
disableNotification: Boolean = false
): Boolean = pinChatMessage(message.chat.id, message.messageId, disableNotification)
): Boolean = pinChatMessage(message.chat.id, message.messageId, businessConnectionId, disableNotification)
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@ import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.chat.modify.UnpinChatMessage
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageId
import dev.inmo.tgbotapi.types.businessConnectionId
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage

public suspend fun TelegramBot.unpinChatMessage(
chatId: ChatIdentifier,
messageId: MessageId? = null
): Boolean = execute(UnpinChatMessage(chatId, messageId))
messageId: MessageId? = null,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
): Boolean = execute(UnpinChatMessage(chatId, messageId, businessConnectionId))

public suspend fun TelegramBot.unpinChatMessage(
chat: Chat,
messageId: MessageId? = null
): Boolean = unpinChatMessage(chat.id, messageId)
messageId: MessageId? = null,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
): Boolean = unpinChatMessage(chat.id, messageId, businessConnectionId)

public suspend fun TelegramBot.unpinChatMessage(
message: AccessibleMessage
): Boolean = unpinChatMessage(message.chat.id, message.messageId)
message: AccessibleMessage,
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
): Boolean = unpinChatMessage(message.chat.id, message.messageId, businessConnectionId)
Loading

0 comments on commit f7cf37f

Please sign in to comment.