From ebe0f0c87fc08373a6a0e7b14917bb3d31369769 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 24 Jun 2018 14:26:45 +0000 Subject: [PATCH] Improve display name parsing Fix #510 --- src/providers/twitch/twitchmessagebuilder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/providers/twitch/twitchmessagebuilder.cpp b/src/providers/twitch/twitchmessagebuilder.cpp index 13a6cba80..a8774922a 100644 --- a/src/providers/twitch/twitchmessagebuilder.cpp +++ b/src/providers/twitch/twitchmessagebuilder.cpp @@ -12,6 +12,7 @@ #include "singletons/settingsmanager.hpp" #include "singletons/thememanager.hpp" #include "singletons/windowmanager.hpp" +#include "util/irchelpers.hpp" #include #include @@ -335,7 +336,7 @@ void TwitchMessageBuilder::appendUsername() auto iterator = this->tags.find("display-name"); if (iterator != this->tags.end()) { - QString displayName = iterator.value().toString(); + QString displayName = util::parseTagString(iterator.value().toString()).trimmed(); if (QString::compare(displayName, this->userName, Qt::CaseInsensitive) == 0) { username = displayName;