Get some clickable links
This commit is contained in:
parent
3ac9282c88
commit
163175748f
@ -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…
Reference in New Issue
Block a user