diff --git a/src/TimelineItem.cc b/src/TimelineItem.cc index 70fc113f..a6eb2bea 100644 --- a/src/TimelineItem.cc +++ b/src/TimelineItem.cc @@ -321,9 +321,11 @@ TimelineItem::generateBody(const QString &userid, const QString &body) { auto sender = userid; - // TODO: Fix this by using a UserId type. - if (userid.split(":")[0].split("@").size() > 1) - sender = userid.split(":")[0].split("@")[1]; + if (userid.startsWith("@")) { + // TODO: Fix this by using a UserId type. + if (userid.split(":")[0].split("@").size() > 1) + sender = userid.split(":")[0].split("@")[1]; + } QString userContent(" %1 "); QString bodyContent(" %1 ");