Don't add homeserver to webhook username, update /me behaviour

This commit is contained in:
git-bruh 2020-12-09 10:39:46 +05:30
parent 0815ac170f
commit 71b6d0cd00
No known key found for this signature in database
GPG key ID: E1475C50075ADCE6

View file

@ -246,10 +246,10 @@ class Callbacks(object):
content_dict = event.source.get("content")
author = event.sender[1:]
author = event.sender.split(":")[0][1:]
avatar = None
homeserver = author.split(":")[-1]
homeserver = event.sender.split(":")[-1]
url = "https://matrix.org/_matrix/media/r0/download"
try:
@ -260,7 +260,7 @@ class Callbacks(object):
pass
if content_dict["msgtype"] == "m.emote":
message = f"* {author.split(':')[0]} {message}"
message = f"_{author} {message}_"
message = await self.process_message(message)