fix displaying ffz emotes
This commit is contained in:
parent
40d8a53134
commit
30f8d063fd
5 changed files with 15 additions and 59 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -7,4 +7,4 @@ coverage.out
|
||||||
.env
|
.env
|
||||||
logs/
|
logs/
|
||||||
config.json
|
config.json
|
||||||
web/public/bundle*
|
web/public/assets/*
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -12,5 +12,5 @@
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
</body>
|
</body>
|
||||||
<!-- webpack-bundle-start --><script src="/assets/bundle.a6426f59305f04b857f0.js"></script><!-- webpack-bundle-end -->
|
<!-- webpack-bundle-start --><script src="/assets/bundle.340f7b019eb67aa6f435.js"></script><!-- webpack-bundle-end -->
|
||||||
</html>
|
</html>
|
|
@ -118,10 +118,10 @@ class LogView extends Component {
|
||||||
|
|
||||||
if (this.props.ffzChannelEmotes) {
|
if (this.props.ffzChannelEmotes) {
|
||||||
for (const emote of Object.values(this.props.ffzChannelEmotes.sets).map(set => set.emoticons).flat()) {
|
for (const emote of Object.values(this.props.ffzChannelEmotes.sets).map(set => set.emoticons).flat()) {
|
||||||
if (replacedEmoteCodes[emote.code]) {
|
if (replacedEmoteCodes[emote.name]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
replacedEmoteCodes[emote.code] = true;
|
replacedEmoteCodes[emote.name] = true;
|
||||||
|
|
||||||
const regex = new RegExp(`\\b(${emote.name})\\b`, "g");
|
const regex = new RegExp(`\\b(${emote.name})\\b`, "g");
|
||||||
message = message.replace(regex, `<img src="${emote.urls[1]}" alt="${emote.name}" />`);
|
message = message.replace(regex, `<img src="${emote.urls[1]}" alt="${emote.name}" />`);
|
||||||
|
|
Loading…
Reference in a new issue