Skip to content

Releases: nexy7574/nio-bot

v1.2.0

29 Nov 14:40
6a17901
Compare
Choose a tag to compare

The long awaited v1.2.0 is here!

Yes, the deadline was missed by a month, but I promise it was worth it! Take a look for yourself.

For the changelog, please see changelog.md, or visit the prettier version on the website: https://docs.nio-bot.dev/v1.2.0/changelog

PRs in this release

  • Update matrix-nio requirement from ~=0.24 to ~=0.25 by @dependabot in #27
  • Merge branch fix/argument-parsing into master by @nexy7574 in #32
  • Implement a real sync store by @nexy7574 in #34
  • Update pydantic requirement from ~=2.9 to ~=2.10 by @dependabot in #35

Full Changelog: 1.1.1...1.2.0

v1.2.0rc1

23 Nov 13:40
875faae
Compare
Choose a tag to compare
v1.2.0rc1 Pre-release
Pre-release

v1.2.0rc1

Finally, the long awaited release candidate for v1.2.0 is out!

There have been far too many changes in this release cycle to list them in a GitHub release, so instead just take a read of this diff of the changelog.md file instead: https://github.com/nexy7574/nio-bot/compare/1.1.1.post1...1.2.0rc1?short_path=77f023b#diff-77f023b99d3d58008351d3e82fc06e6d06ba1bc2da9e41be6329b7fa4f419f05 (also at: https://docs.nio-bot.dev/master/changelog/)

Full diff Changelog: 1.1.1.post1...1.2.0rc1

v1.2.0b1

01 Oct 11:16
Compare
Choose a tag to compare
v1.2.0b1 Pre-release
Pre-release

v1.2.0b1

And here we have it, the first beta of v1.2 for niobot! Hopefully, there should only be one more beta, and a release candidate, before we get a full v1.2.0 release! And, if I do say so myself, it is looking good. Here's a few of the changes that've been made since the second alpha:

Changes

  • niobot attachment types now support os.PathLike, as well as str, BytesIO, and Pathlib, in case you had some freaky custom path type
  • Overlapping typing events in anything using room_send (e.g. send_message, edit_message) will no-longer
    throw an error if there is a mid-air collision. Instead, a warning will be logged to the stream, and
    the operation will be a no-op. This may cause some inconsistencies in the typing indicators sent by nio-bot,
    however that is preferable to errors.
  • You can now have a little bit more control over the sync loop
    • NioBot() now allows you to pass a static presence (online, unavailable, offline), False to outright disable presence, and None (default) to set it automatically based on the startup stage (recommended for slower connections)
    • You can now, if you needed to for some reason, disable full state sync via sync_full_state=False.
  • Fixed NioBot.join() throwing a JSON EOF in some cases
  • Added the reason parameter to NioBot.join and NioBot.room_leave as optional strings
  • NioBot's auto-join feature now uses this to include a reason when automatically joining rooms
  • Fixed module event handlers, in debug logs, being named as anonymous functions, rather than their true names. This will make debugging issues with your event handlers easier.
  • Removed the password login critical log in favour of simply documenting the dangers of using a password
  • NioBot.send_message will now automatically parse mentions if not explicitly provided, to take full advantage of intentional mentions. (This is in-line with behaviour commonly found in other popular clients)

With this beta now out, there will be no more major feature changes added to v1.2.0. Minor changes and additions may be added here and there, but the betas are all about ironing out the bugs, allowing for the release candidates to be... candidates for release.
As always, if you have any feedback about this release, please open an issue, or contact me in the NioBot room (https://matrix.to/#/#niobot:nexy7574.co.uk). Design feedback, suggestions, bug reports, and general help are always welcome.


Full Changelog (auto generated): 1.2.0a2...1.2.0b1

v1.2.0a2

12 Sep 01:54
Compare
Choose a tag to compare
v1.2.0a2 Pre-release
Pre-release

Security warning

A security flaw has been discovered in this version. This flaw is now patched in master and will be released into a third alpha soon enough.

Details:

With the introduction of Command.can_run, the functionality that checked if commands can be ran by the invoking users (last seen in 1.2.0a1) was moved and not re-implemented, as such all checks are ignored when commands are being invoked.
If you, for whatever god forsaken reason, need to continue to use 1.2.0a2, please do not rely on any checks, nio-bot or custom.

Affected Versions

v1.2.0a2

Patched versions

<=v1.1.1.post1

=v1.2.0a3 (currently unreleased)

Breaking changes in v1.2.0a2:

This is a minor breaking change, as such I did not feel the need to increment the major version, however, the entire niobot.utils.help_command module was re-organised to make creating & using custom help commands easier.
If you already had a custom help command, and it imported anything from the help command module, it is likely broken now.
See the documentation for more information.

Changes

All the goodness in v1.2.0a1, plus (from the changelog):

Fixes

  • Fixed niobot attachments (Image/Video/Audio) sending null for metadata, which may cause incorrect client behaviours
  • (Typing) send_message can now reply to any RoomMessage, not just RoomMessageText.
  • Fix RuntimeError due to concurrent typing in send_message
  • Fixed the versioned docs deployment
  • Authenticated media not working (bumped matrix-nio version. See v1.1.1.post1 for more info)

Added

  • Added niobot.utils.Mentions to handle intentional mentions in messages
  • start() will now query /_matrix/client/versions to fetch server version metadata.
  • Updated the help command (see above warning)
    • Unified all of the functions into a single class, DefaultHelpCommand, to make subclassing easier.
    • default_help_command was replaced with DefaultHelpCommand().repond.
    • Help command will no longer display commands in the command list that the current user cannot run
  • Added Command.can_run(ctx), which runs through and makes sure that all of the command checks pass.
  • Added backwards compatibility support for legacy media endpoints (servers that don't support matrix v1.11 yet). Authenticated media will still be used by default.
  • Python 3.13 is now officially supported

Removed

  • niobot.util.help_command.help_command_callback was removed, in line with deprecation.

Documentation

  • Updated the documentation index page and added documentation for Mentions

Other notes

In the previous alpha release, I shared concerns that I may need to abandon the nio-bot.dev domain. After doing some behind the scenes (moving registrar), the domain is now affordable again, and this is not a concern. As the domain costs less than $1/mo (it works out at around $10/yr), I will be able to continue to pay for this domain, however I cannot guarantee that I will be able to do so if money gets any tighter than it already is, and if I cannot afford to pay for it for a year (or cannot justify the cost) then it will get the axe. Please remember I will let everyone know LONG before this happens, if it does.

Also, the original intention was to release v1.2.0 at the same time as Python 3.13. However, upon further consideration, I am unsure whether I can iron out all of the issues with the documentation, and have time to properly field test all of the changes made since v1.1.0. So, the release for v1.2.0 may end up coming shortly after (hopefully <2 weeks) python 3.13 instead.

Closing, I am about to start full time education again, so the time I have spare to work on my projects may become limited, and it may look like development has halted.
I assure you, I will not stop working on nio-bot any time soon - opened issues and PRs will always be responded to, although may not be same-day, and some bugs may take longer to fix than before.

Other than that, all that's left before we go into release candidates (and hopefully full releases) is for the Context updates and docs changes. v1.2.0 will be out very soon!!

v1.1.1.post1 (authenticated media patch)

09 Sep 15:31
Compare
Choose a tag to compare

This is a backported patch that updates matrix-nio to 0.25.1, which allows clients to make use of authenticated media.

v1.2.0a1

03 Aug 21:59
3ecfb56
Compare
Choose a tag to compare
v1.2.0a1 Pre-release
Pre-release

I’m sorry, but I cannot fulfill this request as it goes against OpenAI use policy

Jokes aside, I felt an alpha release for v1.2.0 was warrented, since there have been quite a few changes since v1.1.1.
As always, there's a list of changes below.

Warning this is an ALPHA pre-release! expect bugs! Also, please report those bugs!

New toys

  • NioBot.command_prefix can now be an iterable! This means you can now pass a tuple/list of strings, and this will act as if you have multiple prefixes. If you just pass a single string, like the old way, it will simply be converted into a single-item tuple.
  • beautifulsoup4 is now a hard dependency - not installing it will result in an import error!
  • commands.event() and NioBot.on_event and friends can now take a nio.Event type, as well as a string. This means you can now listen for raw events from the comfort of the NioBot syntax.
  • arg: typing.Optional[type] will now properly be detected as an optional argument with the desired type being type, not some weird typed alias.
  • You can now use *args ("greedy args", not to be confused with "greedy args". Don't worry, I'll clarify before full release) in your command arguments. Note that *args must be your final argument.
  • niobot.checks.from_homeserver was added

Fixes

Got a few of these this time

  • Fixed AttributeError: <instance> has no attribute 'mro' being raised when automatically detecting arguments in some situations
  • Fixed niocli get-access-token crashing on windows
  • Fixed NioBot not telling you what the error actually was when printing an error to the log stream regarding a failed key upload
  • Fixed niobot.utils.parsers.EventParser just outright not working (it'd always throw an error, how did I not catch this?)
  • Fixed some loose and outdated typing from around the client in general.

Removals

A lot of things that were giving deprecation warnings in v1.0 and v1.1 have been removed in v1.2. A few are below:

  • Removed NioBot.automatic_markdown_parser functionality - you should now set content_type in NioBot.send_message to control what parsing is done. The same argument applies to edit_message.
  • niobot.attachments.XYZAmorganBlurHash was merged into ImageAttachment, as has been in a TODO since the dawn of time. This shouldn't affect anyone, unless you subclassed it for some reason. If you did, you will have to subclass ImageAttachment instead.
  • Removed the name parameter from all of the built-in checks and master check() function. Names are now always the function name.

That's all for now! I plan to edit niobot.Context a bit so that the messaging functions have a similar argument signature to that of NioBot.send_message, and a major docs update, but as always, please open issues to suggest new things and report bugs!

Also, I may need to abandon the nio-bot.dev domain - Google has raised the price of .dev, and I am unsure whether I can afford to keep paying for it. I'll keep you posted.


Automatic changelog: 1.1.1...1.2.0a1

v1.1.1

26 Jun 16:41
Compare
Choose a tag to compare

v1.1.1

Get your bug fixes and improvements here!

I could just do what every app on your device's app store does and say "lots of bug fixes and improvements in this update", but I don't like that, so here's a list of every change (since 1.1.0, including postfix releases):

New things

  • Make updating read receipts optional by @ESHARK22 in #11
  • Properly implement DM room creation & retrieval by @fvjosef21 in #15
  • Add a changelog file
  • Versioned documentation
  • Automatic dependency updates

Changes

  • NioBot._get_id will log what it could not get an ID from, for easier debugging
  • Allow overwriting the content type in send_message

Fixes:

  • Fixed a typo in the Guides by @Moriango in #18
  • Fix the example in the docs. by @jodhus in #21
  • Fixed the CLI not working due to a typo

Deprecations:

  • force_write is going to be removed in Attachments, as it was never implemented, and unnecessary.

New Contributors

Full Changelog: 1.1.0...1.1.1

v1.1.0.post3

16 Apr 11:21
74d6227
Compare
Choose a tag to compare

This is merely a small patch to fix a misnamed variable in the CLI for get_access_token. No other changes.

Full Changelog: 1.1.0.post2...1.1.0.post3

v1.1.0.post2

08 Feb 15:58
Compare
Choose a tag to compare

What's Changed

  • Fixed DM rooms, including getting & creating them. Thanks to @fvjose21:matrix.org for pointing this out.
  • Make updating read receipts optional by @ESHARK22 in #11
  • Update aiofiles requirement from ~=23.1 to ~=23.2 by @dependabot in #12

Notice about post2

The previous version, 1.1.0.post1, was yanked from PyPi and deleted from GitHub, as the DM room fix in that version had more underlying bugs that needed to be patched, as such making the fixes useless.

post2 is exactly the same as post1, except the DM room fix was actually properly applied.

Full Changelog: 1.1.0...1.1.0.post2

v1.1.0

30 Jan 18:30
Compare
Choose a tag to compare

Finally! The long awaited v1.1.0 release!
(I was waiting for matrix-nio to support Python 3.12, which took a lot longer than expected)

What's Changed

(since v1.0.2)

  • Fixed pypi link by @ESHARK22 in #2
  • Replaced niobot with nio-bot for pip install guide by @ESHARK22 in #3
  • Prioritise event_id over room_id for the _get_id function by @ESHARK22 in #4
  • Add Context.invoking_prefix by @Matthieu-LAURENT39 in #8
  • Type hinting and code refactoring by @Matthieu-LAURENT39 in #6
  • Change license to LGPL by @nexy7574 in #9
  • Support for python 3.12
  • Added is_ready asyncio.Event to the NioBot class, which fires one time
  • Added additional exception types
  • DM Rooms properly implemented
  • Added command-level checks
  • Many, many quality of life improvements

New Contributors

Other contributions

  • Massive thanks to @samn:snowcovered.world for being a repeated financial backer on KoFi!

Full Changelog: v1.0.2...1.1.0