nerzh / swift-telegram-sdk

🤖 The wrapper for the Telegram Bot API written in Swift. It's not a framework. There is no special syntax here. This is a library that implements all Telegram Bot API methods, which is available to you to work with Vapor, Smoke, Hummingbird, FlyingFox.
https://core.telegram.org/bots/api#available-methods
MIT License
203 stars 32 forks source link

add common properties to TGMaybeInaccessibleMessage #17

Closed hsharghi closed 8 months ago

hsharghi commented 8 months ago

According to API docs v7, both Message and InaccessibleMessage share 3 common properties

To make those properties available when accessing TGMaybeInaccessibleMessage a public extension has been added to TGMaybeInaccessibleMessage. Now any TGMaybeInaccessibleMessage instance can have access to the above properties.

It causes no breaking to new API and also prevents older codes to break.

hsharghi commented 8 months ago

Hello, please, move this extension to another folder and file. For example

telegram-vapor-bot/Sources/TelegramVaporBot/Bot /Telegram/ModelsExtensions/TGMaybeInaccessibleMessageExtensions.swift

Done.