Don't mangle bot's display name

This commit is contained in:
Konstantinos Sideris 2017-09-28 22:26:24 +03:00
parent 03da01423d
commit 2f488bd9e3

View file

@ -321,9 +321,11 @@ TimelineItem::generateBody(const QString &userid, const QString &body)
{ {
auto sender = userid; auto sender = userid;
// TODO: Fix this by using a UserId type. if (userid.startsWith("@")) {
if (userid.split(":")[0].split("@").size() > 1) // TODO: Fix this by using a UserId type.
sender = userid.split(":")[0].split("@")[1]; if (userid.split(":")[0].split("@").size() > 1)
sender = userid.split(":")[0].split("@")[1];
}
QString userContent("<span style=\"color: #171717\"> %1 </span>"); QString userContent("<span style=\"color: #171717\"> %1 </span>");
QString bodyContent("<span style=\"color: #171717;\"> %1 </span>"); QString bodyContent("<span style=\"color: #171717;\"> %1 </span>");