mirror of
				https://github.com/InsanusMokrassar/TelegramBotAPI.git
				synced 2025-10-26 09:40:09 +00:00 
			
		
		
		
	MediaGroupList extensions
This commit is contained in:
		| @@ -16,6 +16,8 @@ | |||||||
| * Change algorithm of `executeUnsafe`: now it use loop instead of recursive calling | * Change algorithm of `executeUnsafe`: now it use loop instead of recursive calling | ||||||
| * Add additional `startGettingUpdates` with better management of received updates for media groups | * Add additional `startGettingUpdates` with better management of received updates for media groups | ||||||
| * Now `MediaGroupMessage` is `CommonMessage` with `MediaGroupContent` content | * Now `MediaGroupMessage` is `CommonMessage` with `MediaGroupContent` content | ||||||
|  | * Added extensions `replyTo`, `forwarded` and `chat` for `List<BaseMessageUpdated` for comfortable | ||||||
|  | work with media groups | ||||||
|  |  | ||||||
| ## 0.9.0 | ## 0.9.0 | ||||||
|  |  | ||||||
|   | |||||||
| @@ -0,0 +1,19 @@ | |||||||
|  | package com.github.insanusmokrassar.TelegramBotAPI.utils | ||||||
|  |  | ||||||
|  | import com.github.insanusmokrassar.TelegramBotAPI.types.chat.Chat | ||||||
|  | import com.github.insanusmokrassar.TelegramBotAPI.types.message.ForwardedMessage | ||||||
|  | import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.* | ||||||
|  | import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseMessageUpdate | ||||||
|  |  | ||||||
|  | val List<BaseMessageUpdate>.forwarded: ForwardedMessage? | ||||||
|  |     get() = first().let { | ||||||
|  |         (it as? AbleToBeForwardedMessage) ?.forwarded | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | val List<BaseMessageUpdate>.replyTo: Message? | ||||||
|  |     get() = first().let { | ||||||
|  |         (it as? AbleToReplyMessage) ?.replyTo | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | val List<BaseMessageUpdate>.chat: Chat? | ||||||
|  |     get() = first().data.chat | ||||||
		Reference in New Issue
	
	Block a user