Support file URLs

This commit is contained in:
2021-01-17 20:49:57 +01:00
parent 987a07e921
commit 12f3a0fc6f
4 changed files with 12 additions and 1 deletions

View File

@ -85,6 +85,11 @@ class SimpleMessage:
"""The nick of the message."""
return self.message["mucnick"]
@property
def url(self):
"""The URL of a sent file."""
return self.message["oob"]["url"]
class Config:
"""Bot file configuration."""
@ -533,6 +538,7 @@ class Bot(ClientXMPP):
self.register_plugin("xep_0045") # Multi-User Chat
self.register_plugin("xep_0199") # XMPP Ping
self.register_plugin("xep_0084") # User Avatar
self.register_plugin("xep_0066") # Proces URIs (files, images)
try:
for plugin in self.plugins: