summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-06 22:41:02 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-06 22:41:02 +0300
commita1af99becb8d0a9cf8dd39c15781da6742193567 (patch)
tree9e77a819422d7d3b8fa2963863e4cb0c61701347
parentAdd initial support for displaying formatted messages (diff)
downloadnheko-a1af99becb8d0a9cf8dd39c15781da6742193567.tar.xz
Put back removed links
-rw-r--r--src/timeline/TimelineItem.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/timeline/TimelineItem.cpp b/src/timeline/TimelineItem.cpp
index 7548a5a5..8ff69bee 100644
--- a/src/timeline/TimelineItem.cpp
+++ b/src/timeline/TimelineItem.cpp
@@ -448,6 +448,7 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Notice
 
         generateTimestamp(timestamp);
 
+        formatted_body.replace(conf::strings::url_regex, conf::strings::url_html);
         formatted_body = "<i>" + formatted_body + "</i>";
 
         if (with_sender) {
@@ -493,6 +494,8 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Emote>
 
         descriptionMsg_ = {"", sender, emoteMsg, utils::descriptiveTime(timestamp), timestamp};
 
+        formatted_body.replace(conf::strings::url_regex, conf::strings::url_html);
+
         generateTimestamp(timestamp);
 
         if (with_sender) {
@@ -533,6 +536,8 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Text>
         auto timestamp   = QDateTime::fromMSecsSinceEpoch(event.origin_server_ts);
         auto displayName = Cache::displayName(room_id_, sender);
 
+        formatted_body.replace(conf::strings::url_regex, conf::strings::url_html);
+
         QSettings settings;
         descriptionMsg_ = {sender == settings.value("auth/user_id") ? "You" : displayName,
                            sender,