Don't add homeserver to webhook username, update /me behaviour
This commit is contained in:
parent
0815ac170f
commit
71b6d0cd00
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -246,10 +246,10 @@ class Callbacks(object):
|
||||||
|
|
||||||
content_dict = event.source.get("content")
|
content_dict = event.source.get("content")
|
||||||
|
|
||||||
author = event.sender[1:]
|
author = event.sender.split(":")[0][1:]
|
||||||
avatar = None
|
avatar = None
|
||||||
|
|
||||||
homeserver = author.split(":")[-1]
|
homeserver = event.sender.split(":")[-1]
|
||||||
url = "https://matrix.org/_matrix/media/r0/download"
|
url = "https://matrix.org/_matrix/media/r0/download"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -260,7 +260,7 @@ class Callbacks(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if content_dict["msgtype"] == "m.emote":
|
if content_dict["msgtype"] == "m.emote":
|
||||||
message = f"* {author.split(':')[0]} {message}"
|
message = f"_{author} {message}_"
|
||||||
|
|
||||||
message = await self.process_message(message)
|
message = await self.process_message(message)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue