Highlight Matrix attachment name

This commit is contained in:
git-bruh 2020-11-14 20:55:37 +05:30
parent 01971b6c10
commit ca48e4c134
No known key found for this signature in database
GPG key ID: E1475C50075ADCE6

View file

@ -225,6 +225,9 @@ async def message_callback(room, event):
# Get attachments # Get attachments
try: try:
# Highlight attachment name
message = f"`{message}`"
attachment = event.url.split("/")[-1] attachment = event.url.split("/")[-1]
message += f"\n{url}/{homeserver}/{attachment}" message += f"\n{url}/{homeserver}/{attachment}"
except AttributeError: except AttributeError: