- Version updates:
- Ktor version
1.2.6
->1.3.0
- Telegram Bot API
0.21.0
->0.22.1
- Ktor version
TimerTriggerStrategy
now have new extensiongetPostsInRange
andgetTriggersInRange
MostRatedChooser
now correctly work with exceptions list
DatabaseConfig#connect
now is deprecated. It is recommended to useDatabaseConfig#database
property- Fixed issue with
PostsSchedulesTable
, when table was not created automatically - Refactor work with posts and posts messages
PostsTable
andPostsMessagesTable
now are deprecated global values. It can be replaced inside of plugins by callingbaseConfig.postsTable
orbaseConfig.postsMessagesTable
inside ofonInit
block of your pluginPostTransaction
now have incoming argumentspostsTable
andpostsMessagesTable
, which are by default set up to deprecated global variablesRateChooser
now have two protected fields:postsTable
andpostsMessagesTable
- Several classes now have
postsTable
or/andpostsMessagesTable
as arguments. Remember that it is optional for now, but will be required soon:PublishPost
DisableTimerCommand
EnableTimerCommand
GetSchedulesCommand
TimerScheduleCommand
PostsSchedulesTable
now require database connection as argumentPostsTableScope
now is deprecated due to incorrect visibility level (soon it will beprivate
)SafeLazy
util class was added. You can useCoroutineScope#createSafeLazy
for easily creating of it
TimerTriggerStrategy
now have additional optional parametersubstitutedByScheduler
(boolean, defaultfalse
). In case of setting up this parameter totrue
, plugin will skip times which was set in schedule plugin- Version updates:
- Ktor version
1.3.0
->1.3.1
- Telegram Bot API
0.22.1
->0.23.2
- Ktor version
- Version updates:
- Kotlin coroutines
1.3.2
->1.3.3
- Telegram Bot API
0.20.3
->0.21.0
- Kotlin coroutines
- Now it is not recommended to use
/
in commands notations when usebuildCommandFlow
orCommand
extenders
- Version updates:
- Kotlin version
1.3.41
->1.3.61
- Kotlin coroutines
1.2.2
->1.3.2
- Kotlin seriaization
0.11.1
->0.14.0
- Telegram Bot API
0.17.0
->0.19.0
- ktor version
1.2.3
->1.2.6
- Kotlin version
PluginSerializer
now is internal- Now some part of dependencies are included by
api
and must not be included in dependent projects directly:- Coroutines
- Serialization
- TelegramBotAPI
- Kotlin Exposed
- Deprecations clean up:
com.github.insanusmokrassar.AutoPostTelegramBot.plugins.choosers.Chooser
com.github.insanusmokrassar.AutoPostTelegramBot.plugins.rating.RatingPlugin
. WARNING: WAS REMOVED WHOLE CONTENT OF RATING API PLUGINcom.github.insanusmokrassar.AutoPostTelegramBot.plugins.base.PostsUsedTable
com.github.insanusmokrassar.AutoPostTelegramBot.utils.MessagesResendingKt.cacheMessages
com.github.insanusmokrassar.AutoPostTelegramBot.base.database.tables.PostsMessagesTable#removeMessageOfPost
TelegramBotAPI
version0.19.0
->0.20.1
TelegramBotAPI
version0.20.1
->0.20.3
-
Kotlin version
1.3.31
->1.3.41
-
Kotlin coroutines
1.2.1
->1.2.2
-
Kotlin seriaization
0.11.0
->0.11.1
-
Telegram Bot API
0.15.0
->0.17.0
-
ktor version
1.1.4
->1.2.3
-
New field in
BotConfig
-telegramAPIUrlsKeeper
- Fix for
SmartChooser
item age checker
PostsSchedulesTable
channels now are private and has no longer accessiblePostsMessagesTable
now is using flows for output broadcasting and non-conflated broadcast channels inside- Remove
Launch
deprecations - Actualize
Config
- Actualizing
WebhookConfig
PostsLikesMessagesTable
now is not using deprecatedPostsUsedTable
BasePlugin
now is not using deprecatedPostsUsedTable
RatingCommand
was removedCommand
now have no its own loggerPluginManager#findFirstPlugin
extension was addedLaunch
listeners now are privateLongPollingConfig
was addedBotConfig
now have an additional field:longPollingConfig
FinalConfig
have nocreateFilter
method for now and uselongPollingConfig
- Fixes in
Scheduler
task update
TelegramBotAPI
version0.12.7
->0.14.0
- Added dependencies for server (
CIO
) and client (OkHttp
) ktor engines - Added
CoroutineScope
helper functions - Rewritten logic of scheduler work
- Update
TelegramBotAPI
version0.14.0
->0.14.1
- In
Launch
addedflowFilter
and updates collecting rewritten on flows RatingPlugin
abstraction was addedChooser
now use suspend function instead of common- Old
RatingPlugin
is deprecated for now - Checked flows for listeners added
buildCommandFlow
function added - it will create flow with checked command fromcheckedMessagesFlow
- Was added
collectWithErrors
function
- Added
checkedEditedMessagesFlow
messagesListener
will not broadcast edited eventsPostsUsedTable
now is deprecatedFixPost
will remove transaction only in case of availability of itBasePlugin
now work with internal lambdas and coroutine jobsCommonKnownPostsTransactions
was createdTelegramBotAPI
version0.14.1
->0.14.2
- Hotfixes and refactoring in
PostPublisher
cacheMessages
is deprecated for now
- Fix problem of publishing info about removing of Post
- Fixes in scheduler
Scheduler
now is using the flowsPostsSchedulesTable
now prefer to use flows for output broadcasting
- Update version of
TelegramBotAPI
from0.11.0
to0.12.0
- Remove
CONFLATED_MODE_ON
environment variable checking. Now all channels by default conflated - Added section to bot config
webhookConfig
DisableRating
now have more obvious logging and behaviour
TelegramBotAPI
version0.12.0
->0.12.1
- Adapt project tto new types of updates
- Update
TelegramBotAPI
version0.12.2
->0.12.3
- Hotfix for
PostPublisher
behaviour - now it will remove posts without forwardable messages
Chooser
abstraction was replaced to the base package- Add abstraction
PostId
which actually isInt
- Now all choosers can accept exceptions for skip choosing of some posts
- Added new command
getAutoPublications
- Update version of
TelegramBotAPI
from0.12.3
to0.12.5
- Add utility methods for messages resending
- Extracted base commands regexps outside of classes
PostPublisher
channelpostPublishedChannel
now have list of messages as value for notification
kotlin
version1.3.21
->1.3.30
kotlin coroutines
version1.1.1
->1.2.0
kotlin serialization
version0.10.0
->0.11.0
TelegramBotAPI
version0.12.5
->0.12.6
ListSerializer
renamed toPluginsListSerializer
and now just delegated byArrayListSerializer
with newPluginSerializer
TelegramBotAPI
version0.12.6
->0.12.7
- Update version of libraries
- Remove deprecations
- Fix errors
- Fix publishing of media groups
- Fix BotLogger scope
- Fix problem with repeated media group triggering of posts
- Rewrite to use new version of library for telegram bot API
- Add automatic connect by after configuration into database
- Fix of #27
- Update
TelegramBotAPI
version0.8.4
->0.9.0
- Update version of TelegramBotAPI
- Update output of errors in
PostPublisher
andRegisteredRefresher
disableLikesForPost
now execute requests unsafely (for avoid cases of unavailable deleting messages)PostPublisher
now usecreateResends
for messages
sendToLogger
now is extension forAny
for correct sending of source class and methodBotLogger
will try to send log messages withMarkdown
parse mod and, if not success, withoutTimerTriggerStrategy
now will await near time to trigger publish- Experimentally replace all
LaunchKt
broadcast channels by customUnlimitedBroadcastChannel
- Experimentally replace all BroadcastChannel factory invocations by creating of
UnlimitedBroadcastChannel
- Update
TelegramBotAPI
0.9.1
->0.9.2
registerPostMessage
by default use 3 retries to register post message
- Add registering of messages for on the init of
DefaultPostRegisteredMessage
- Rename
PostMessagesRegistrant
and replace its registering function inside - Add
PostsMessagesTable#findPostByMessageId
- Add
/renewRegistered
(or/renewRegisteredMessage
) command
- Fix
Config
data
- Revert experimental using of
UnlimitedBroadcastChannel
- Experimentally replace all
Channel.CONFLATE
data by exact values - Update version of
TelegramBotAPI
:0.9.2
->0.9.3
- Update
TelegramBotAPI
version0.9.3
->0.10.0
- Fix problem of replying for message in post which is absent. Now when message is absent registerer will try to get a new one (first one) until it will find some present or delete post for the reason that there is no available messages for post
- Add optional otherwise field
- Add custom scope for launch
- Fix renew registered message and autoremove of post when there is no available post messages
- Add method
chooseCapacity
for cases when capacity of channels can beCONFLATED
- Add usage
chooseCapacity
to all default BroadcastChannels instantiating
- Update version of
TelegramBotAPI
from0.10.0
to0.10.3
- Enable and disable of ratings now are using with commands
- Fixes in
RegisteredRefresher
- Add
CallbackQueryReceivers
package with receivers interface and implementations - Rewrite rating receivers to use
SafeCallbackQueryReceiver
- Now rating receivers will automatically register message for post as likes message if have no registered
TimerTriggerStrategy
now do not using synchronisations- Add
Iterable<CalculatedDateTime>#nearDateTime
TimerTriggerStrategy
config now receive time as parameter- Now
DatabaseConfig
is independent class which can connect to Database
- Changed version naming strategy: now it is
x.y.z
where:- x - major version (release version)
- y - minor version (feature version)
- z - fix version
- Add util for work with time
(
String.parseDateTimes(): List<CalculatedDateTime>
) - Added extension for planning actions
(
Iterable<CalculatedDateTime>.launchNearFuture(suspend () -> R): Deferred<R>
) - Added extension for pairs of dates and times
(
Iterable<CalculatedDateTime>.asPairs(): List<CalculatedPeriod>
) - Rewrite plugins to use new dates utils:
SmartChooser
Scheduler
Fixed SmartChooser wrong time checker
- Add
CalculatedDateTime#nearInPast
- Add
CalculatedDateTime#asFor
- Add
CalculatedDateTime#asFutureFor
- Add
CalculatedDateTime#asPastFor
- Add
CalculatedDateTime#isBetween
- Rewrite
SmartTimer
item methodisActual
to useisBetween
for pairs
- Optimise
CalculatedDateTime#isBetween
- Fix
CalculatedDateTime#asPartFor
Fix of get scheduled posts command
Fix of recognising of get command argument
Fix of calculating of future and past
- Now
GarbageCollector
receiveskipTime
instead oftrackingDelay
in format of standard date time - Now
GarbageCollector
receivemanualCheckTime
instead ofmanualCheckDelay
in format of standard date time - Renaming and improvement for
List<CalculatedDateTime>#executeNearFuture
Fix of CalculatedDateTime#asPastFor
- now it will decrease time even if source is equal
- Fix of
GarbageCollector#check
- Add extension
DateTime#withoutTimeZoneOffset
- Fix of
GarbageCollector
time detection CalculatedDateTime#asFutureFor
will guarantee return future datetime even ifsource
is equal to generatednow
BREAK CHANGES
This update contains changes which related to behaviour of publishing of posts. If to be exactly - now you do not need to use raw markdown for posts
- Now you can subscribe directly on
ReceiveChannel
updates - Rewrite
debounce
, now it is more compact and effective - Proxy settings was replaced into
clientConfig
settings - Add
Message#textOrCaptionToMarkdown()
, now you can use simple way to preformat messages - Forwarders now work with preformatted text (like this or this)
- Now
BotLogger
may haveparams
section which look likecommonBot
section in general config for creating independent bot instance. It will be useful for free real bot - Added
BotConfig
and temporary keep old settings, but update instruction to use new config schema
- Updated dependencies
Kotlin
-> 1.2.61Kotlin Coroutines
-> 0.25.0TelegramBot
-> 4.1.0
- Added
TelegramBot#executeSync
(as a replacement forexecute
ofTelegramBot
, which block all requests data thread) - Added
BotLogger
plugin and removed init by default ofLogHandler
- Small fixes
- Hotfixes for
0.4.0
version - Update
Kotlin Coroutines
-> 0.25.3
- Fixes in scheduler plugin
- Added
/getPublishSchedule
command - Added
/disableSchedulePublish
command - Now publisher will automatically remove
/publishPost
message
- Now posts contain creation datetime (look at
PostsTable#getPostCreationDateTime(Int)
) - Update
BotLogger
behaviour - Fix problem with canceling of next scheduled job for
SchedulerPlugin
- Fix behaviour of GetSchedulesCommand when queue is empty
- Add for items of
SmartChooser
plugin config optionsminAge
andmaxAge
for prefilter posts which too old or too young
BREAK CHANGES
- Update Java version from
1.7
->1.8
- Disabled availability to use infinity
executeSync
andexecuteAsync
PostTransactionTable
now closeable - you can useuse
and other- Fix problem with forward posts which contain deleted posts
BREAK CHANGES
- Added
SemaphoreK
- Add work with semaphore in execution bot extensions
- Add availibility to set up requests regen settings
- Add
PostTransaction
- BREAK CHANGE:
PostTransactionTable
was removed - BREAK CHANGE: Remove
executeSync
- Add
executeBlocking(T, TelegramBot, Int, Long)
- Please, note that old methods as
executeAsync
is not recommended to use
- Please, note that old methods as
- ALL BROADCASTS NOW ARE CONFLATED
BotIncomeMessagesListener
version0.9b
->0.9
- Fixes in Scheduler plugin
- Add handling of possible throws from
resume
inSemaphore
- GarbageCollector can receive parameter
trackingDelay
- Removed redundant
PluginVersion
typealias - Fixes in
BotLogger
- Note: temporary you will not be able to change log level
of
commonLogger
(now it is FINER)
- Note: temporary you will not be able to change log level
of
- Hotfix for
0.4.6
- Fix of GarbageCollector
- Deprecate old remove post messages mechanism and add more informative mechanism of notifying about removed messages
- Add extension for
BroadcaseChannel
subscribing for more comfortable interact with events channels
- Hotfix for problem with new extension for BroadcastChannels
- Changed return type of forwarders
- Now you can subscribe onto post published events
- Fixed problem with scheduler on initialization (without any event scheduler will not update job, but now fixed)
- Add
BroadcastReceiver#debounce
- Fix
TimerTriggerStrategy
calculating delay and put trigger work in different async block
BREAK CHANGES
- Add
PostsUsedTable
, now any plugin or action which can potentially publish recommended to register/unregister in this table - Rename methods of
PostsLikesMessagesTable
to be consistent with their behaviours - Now plugins
HAVE NO VERSIONS
and must not implementonInit
method
- Added
Throwable#collectStackTrace
which return as string stacktrace of caller - Added
String#splitByStep
,String#splitForMessage
andString#splitForMessageWithAdditionalStep
- Added logger handler for all logger events which was created by bot by default
- Added
commonLogger
and deprecatedpluginLogger