Browse Source

Get some clickable links

master
decentral1se 5 months ago
parent
commit
163175748f
No known key found for this signature in database GPG Key ID: 92DAD76BD9567B8A
  1. 3
      LogBot/logbot.py

3
LogBot/logbot.py

@ -147,6 +147,9 @@ class Logbot(Bot):
self.db[message.room]["messages"][new_key] = media_post
else:
post = message.content.replace("@add ", "")
for url in re.findall(r"http\S+", post):
url_with_href = f"<a href='{url}'>{url}</a>"
post.replace(url, url_with_href)
self.db[message.room]["messages"][new_key] = post
self.db._dumps()

Loading…
Cancel
Save