Pass uploads to Bot.group

Closes https://git.autonomic.zone/decentral1se/xbotlib/issues/32.
This commit is contained in:
Luke Murphy 2021-01-18 11:13:25 +01:00
parent fecb135f11
commit 46d054243c
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,9 @@
# xbotlib x.x.x (UNRELEASED)
# xbotlib 0.12.4 (2021-01-18)
- Allow `Bot.group` to respond to file uploads ([#32](https://git.autonomic.zone/decentral1se/xbotlib/issues/32))
# xbotlib 0.12.3 (2021-01-17)
- Support OOB URLs in `SimpleMessage`

View File

@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api"
[tool.poetry]
name = "xbotlib"
version = "0.12.3"
version = "0.12.4"
description = "XMPP bots for humans"
authors = ["decentral1se <lukewm@riseup.net>"]
maintainers = ["decentral1se <lukewm@riseup.net>"]

View File

@ -518,9 +518,9 @@ class Bot(ClientXMPP):
miss = message.type not in self.GROUP_MESSAGE_TYPES
loop = message.nick == self.nick
other = self.nick not in message.text
other = self.nick not in message.text and not message.url
if miss or loop or other:
if miss or other or loop:
return
if message.content.startswith("@"):