diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-30 12:57:27 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-30 12:57:27 -1000 |
commit | 584d7b9070f3c4ad05308c809e30b3ce0d1c5fce (patch) | |
tree | 19203bca8521f0aa43c6f784248c510f169bff9c /lib | |
parent | 47d16b17caff9dabdb02e246a9869527c06a6a92 (diff) | |
download | patchfoo-584d7b9070f3c4ad05308c809e30b3ce0d1c5fce.tar.gz patchfoo-584d7b9070f3c4ad05308c809e30b3ce0d1c5fce.zip |
Prefer message's mentioned emoji over builtin emoji
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/render.js b/lib/render.js index 0135205..83c6d10 100644 --- a/lib/render.js +++ b/lib/render.js @@ -88,14 +88,6 @@ function Render(app, opts) { Render.prototype.emoji = function (emoji) { var name = ':' + emoji + ':' - if (emoji in emojis) { - return h('img.ssb-emoji', { - src: this.opts.emoji_base + emoji + '.png', - alt: name, - height: 17, - title: name, - }) - } var link = this._mentions[name] if (link && link.link) { this.app.reverseEmojiNameCache.set(emoji, link.link) @@ -107,6 +99,14 @@ Render.prototype.emoji = function (emoji) { title: name, }) } + if (emoji in emojis) { + return h('img.ssb-emoji', { + src: this.opts.emoji_base + emoji + '.png', + alt: name, + height: 17, + title: name, + }) + } return name } |