diff options
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 2fd4b6d4..54e054ec 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -775,19 +775,18 @@ TimelineModel::replyAction(QString id) event = decryptEvent(*e).event; } - RelatedInfo related = {}; - related.quoted_user = QString::fromStdString(mtx::accessors::sender(event)); - related.related_event = mtx::accessors::event_id(event); - related.type = mtx::accessors::msg_type(event); - related.quoted_body = mtx::accessors::formattedBodyWithFallback(event); - related.quoted_body.remove(QRegularExpression( + RelatedInfo related = {}; + related.quoted_user = QString::fromStdString(mtx::accessors::sender(event)); + related.related_event = mtx::accessors::event_id(event); + related.type = mtx::accessors::msg_type(event); + related.quoted_body = QString::fromStdString(mtx::accessors::body(event)); + related.quoted_body = utils::getQuoteBody(related); + related.quoted_formatted_body = mtx::accessors::formattedBodyWithFallback(event); + related.quoted_formatted_body.remove(QRegularExpression( "<mx-reply>.*</mx-reply>", QRegularExpression::DotMatchesEverythingOption)); nhlog::ui()->debug("after replacement: {}", related.quoted_body.toStdString()); related.room = room_id_; - // if (related.quoted_body.isEmpty()) - // return; - ChatPage::instance()->messageReply(related); } |