@@ -265,16 +265,16 @@ TimelineItem::TimelineItem(mtx::events::MessageType ty,
265
265
auto timestamp = QDateTime::currentDateTime ();
266
266
267
267
if (ty == mtx::events::MessageType::Emote) {
268
- body = QString (" * %1 %2" ).arg (displayName).arg (body);
268
+ body = QString (" %1 %2" ).arg (displayName).arg (body);
269
269
descriptionMsg_ = {" " , userid, body, utils::descriptiveTime (timestamp), timestamp};
270
270
} else {
271
271
descriptionMsg_ = {
272
272
" You: " , userid, body, utils::descriptiveTime (timestamp), timestamp};
273
273
}
274
274
275
- body = body. toHtmlEscaped ( );
276
- body. replace (conf::strings::url_regex, conf::strings::url_html );
277
- body. replace ( " \n " , " <br/> " );
275
+ body = QString::fromStdString ( utils::markdownToHtml (body) );
276
+ body = utils::linkifyMessage (body );
277
+
278
278
generateTimestamp (timestamp);
279
279
280
280
if (withSender) {
@@ -489,7 +489,7 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Emote>
489
489
490
490
auto timestamp = QDateTime::fromMSecsSinceEpoch (event.origin_server_ts );
491
491
auto displayName = Cache::displayName (room_id_, sender);
492
- auto emoteMsg = QString (" * %1 %2" ).arg (displayName).arg (formatted_body);
492
+ auto emoteMsg = QString (" %1 %2" ).arg (displayName).arg (formatted_body);
493
493
494
494
descriptionMsg_ = {" " , sender, emoteMsg, utils::descriptiveTime (timestamp), timestamp};
495
495
0 commit comments