Explorar o código

Wait until emojis are initialized...

before adding them to the message body
JC Brand %!s(int64=5) %!d(string=hai) anos
pai
achega
1b520328fa
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/templates/directives/body.js

+ 1 - 0
src/templates/directives/body.js

@@ -32,6 +32,7 @@ class MessageBodyRenderer extends String {
 
         let list = await Promise.all(u.addHyperlinks(text));
 
+        await api.waitUntil('emojisInitialized');
         list = list.reduce((acc, i) => isString(i) ? [...acc, ...u.addEmoji(i)] : [...acc, i], []);
 
         const addMentions = text => addMentionsMarkup(text, this.model.get('references'), this.model.collection.chatbox)