From 2e7bbaee403117ff00d357d129324d4f20d7afb3 Mon Sep 17 00:00:00 2001 From: Will Hunt <will@half-shot.uk> Date: Tue, 13 Feb 2018 20:01:44 +0000 Subject: [PATCH] Fix getting content from member event properly --- src/bot.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bot.ts b/src/bot.ts index 045f1cf..26acfac 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -197,9 +197,7 @@ export class DiscordBot { if (result.botUser) { // We are doing this through webhooks so fetch the user profile. profile = await mxClient.getStateEvent(event.room_id, "m.room.member", event.sender); - if (profile !== null) { - profile = profile.content; - } else { + if (profile === null) { log.warn("DiscordBot", `User ${event.sender} has no member state. That's odd.`); } } -- GitLab