Highlight Matrix attachment name
This commit is contained in:
parent
01971b6c10
commit
ca48e4c134
1 changed files with 3 additions and 0 deletions
3
main.py
3
main.py
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue