summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-01-26 22:36:35 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-02-09 20:22:02 +0100
commit2e77a1554f1572b7c7e59f8177a48e5dffa16c23 (patch)
treea6a6c22e64646683d8c283e391d922fa4da1b335 /src/timeline/TimelineModel.cpp
parentFix wrong font used in emoji escape (diff)
downloadnheko-2e77a1554f1572b7c7e59f8177a48e5dffa16c23.tar.xz
Switch to new relations format
Diffstat (limited to '')
-rw-r--r--src/timeline/TimelineModel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index 968ec3c7..c47194f5 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -360,7 +360,7 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r const static QRegularExpression replyFallback( "<mx-reply>.*</mx-reply>", QRegularExpression::DotMatchesEverythingOption); - bool isReply = !in_reply_to_event(event).empty(); + bool isReply = relations(event).reply_to().has_value(); auto formattedBody_ = QString::fromStdString(formatted_body(event)); if (formattedBody_.isEmpty()) { @@ -442,7 +442,7 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r return cache::isRoomEncrypted(room_id_.toStdString()); } case ReplyTo: - return QVariant(QString::fromStdString(in_reply_to_event(event))); + return QVariant(QString::fromStdString(relations(event).reply_to().value_or(""))); case Reactions: { auto id = event_id(event); return QVariant::fromValue(events.reactions(id));