Skip to content

Commit

Permalink
fix(message): remove entities decode (#4287)
Browse files Browse the repository at this point in the history
We need to remove entities decode (don't remember why we need it) as it
strips out e.g. api calls like &lang=de
  • Loading branch information
sogehige committed Nov 8, 2020
1 parent 9beb15e commit b1684d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/bot/message.ts
Expand Up @@ -5,7 +5,6 @@ import querystring from 'querystring';
import _ from 'lodash';
import crypto from 'crypto';
import gitCommitInfo from 'git-commit-info';
import { AllHtmlEntities as Entities} from 'html-entities';

import { debug, error, warning } from './helpers/log';
import { getCountOfCommandUsage } from './helpers/commands/count';
Expand Down Expand Up @@ -42,7 +41,7 @@ class Message {
message = '';

constructor (message: string) {
this.message = Entities.decode(message);
this.message = message;
}

async global (opts: { escape?: string, sender?: CommandOptions['sender'] }) {
Expand Down Expand Up @@ -145,7 +144,7 @@ class Message {
this.message = this.message.replace(/\$ytSong/g, translate('songs.not-playing'));
}

return Entities.decode(this.message);
return this.message;
}

async parse (attr: { [name: string]: any, sender: CommandOptions['sender'], 'message-type'?: string, forceWithoutAt?: boolean } = { sender: getBotSender() }) {
Expand Down

0 comments on commit b1684d5

Please sign in to comment.