From 79308b60625bfc00c495fa731e5154075c86b090 Mon Sep 17 00:00:00 2001 From: git-bruh Date: Sat, 22 Jan 2022 20:33:48 +0530 Subject: [PATCH] fix webhook username/avatar syncing --- appservice/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appservice/main.py b/appservice/main.py index daabdfa..4bfd5a2 100644 --- a/appservice/main.py +++ b/appservice/main.py @@ -476,12 +476,12 @@ class DiscordClient(Gateway): f"{self.app.server_name}" ) - def sync_profile(self, user: discord.User) -> None: + def sync_profile(self, user: discord.User, hashed: str = "") -> None: """ Sync the avatar and username for a puppeted user. """ - mxid = self.matrixify(user.id, user=True) + mxid = self.matrixify(user.id, user=True, hashed=hashed) profile = self.app.db.fetch_user(mxid) @@ -534,7 +534,7 @@ class DiscordClient(Gateway): if message.webhook_id: # Sync webhooks here as they can't be accessed like guild members. - self.sync_profile(message.author) + self.sync_profile(message.author, hashed=hashed) return mxid, room_id