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

this.bot > this.opts.bot

parent c51a5829
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -84,4 +84,5 @@ export class MatrixEventProcessor { ...@@ -84,4 +84,5 @@ export class MatrixEventProcessor {
} }
return body; return body;
} }
} }
...@@ -150,7 +150,7 @@ export class MessageProcessor { ...@@ -150,7 +150,7 @@ export class MessageProcessor {
const id = results[ID_EMOJI_REGEX_GROUP]; const id = results[ID_EMOJI_REGEX_GROUP];
try { try {
// we still fetch the mxcUrl to check if the emoji is valid= // we still fetch the mxcUrl to check if the emoji is valid=
const mxcUrl = await this.bot.GetEmoji(name, animated, id); const mxcUrl = await this.opts.bot.GetEmoji(name, animated, id);
content = content.replace(results[0], `:${name}:`); content = content.replace(results[0], `:${name}:`);
} catch (ex) { } catch (ex) {
log.warn("MessageProcessor", log.warn("MessageProcessor",
...@@ -169,7 +169,7 @@ export class MessageProcessor { ...@@ -169,7 +169,7 @@ export class MessageProcessor {
const name = escapeHtml(results[NAME_EMOJI_REGEX_GROUP]); const name = escapeHtml(results[NAME_EMOJI_REGEX_GROUP]);
const id = results[ID_EMOJI_REGEX_GROUP]; const id = results[ID_EMOJI_REGEX_GROUP];
try { try {
const mxcUrl = await this.bot.GetEmoji(name, animated, id); const mxcUrl = await this.opts.bot.GetEmoji(name, animated, id);
content = content.replace(results[0], content = content.replace(results[0],
`<img alt="${name}" src="${mxcUrl}" style="height: ${EMOJI_SIZE};"/>`); `<img alt="${name}" src="${mxcUrl}" style="height: ${EMOJI_SIZE};"/>`);
} catch (ex) { } catch (ex) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter