Skip to content
Extraits de code Groupes Projets
Valider 2e7bbaee rédigé par Will Hunt's avatar Will Hunt
Parcourir les fichiers

Fix getting content from member event properly

parent 84c5a3f9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -197,9 +197,7 @@ export class DiscordBot { ...@@ -197,9 +197,7 @@ export class DiscordBot {
if (result.botUser) { if (result.botUser) {
// We are doing this through webhooks so fetch the user profile. // We are doing this through webhooks so fetch the user profile.
profile = await mxClient.getStateEvent(event.room_id, "m.room.member", event.sender); profile = await mxClient.getStateEvent(event.room_id, "m.room.member", event.sender);
if (profile !== null) { if (profile === null) {
profile = profile.content;
} else {
log.warn("DiscordBot", `User ${event.sender} has no member state. That's odd.`); log.warn("DiscordBot", `User ${event.sender} has no member state. That's odd.`);
} }
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter