Pass uploads to Bot.group
Closes https://git.autonomic.zone/decentral1se/xbotlib/issues/32.
This commit is contained in:
parent
fecb135f11
commit
46d054243c
@ -1,5 +1,9 @@
|
|||||||
# xbotlib x.x.x (UNRELEASED)
|
# 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)
|
# xbotlib 0.12.3 (2021-01-17)
|
||||||
|
|
||||||
- Support OOB URLs in `SimpleMessage`
|
- Support OOB URLs in `SimpleMessage`
|
||||||
|
@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api"
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "xbotlib"
|
name = "xbotlib"
|
||||||
version = "0.12.3"
|
version = "0.12.4"
|
||||||
description = "XMPP bots for humans"
|
description = "XMPP bots for humans"
|
||||||
authors = ["decentral1se <lukewm@riseup.net>"]
|
authors = ["decentral1se <lukewm@riseup.net>"]
|
||||||
maintainers = ["decentral1se <lukewm@riseup.net>"]
|
maintainers = ["decentral1se <lukewm@riseup.net>"]
|
||||||
|
@ -518,9 +518,9 @@ class Bot(ClientXMPP):
|
|||||||
|
|
||||||
miss = message.type not in self.GROUP_MESSAGE_TYPES
|
miss = message.type not in self.GROUP_MESSAGE_TYPES
|
||||||
loop = message.nick == self.nick
|
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
|
return
|
||||||
|
|
||||||
if message.content.startswith("@"):
|
if message.content.startswith("@"):
|
||||||
|
Reference in New Issue
Block a user