summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-07-13 02:36:10 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-07-13 02:36:10 +0200
commitc600827f7877b2c4ec403613b136576cba260771 (patch)
tree8b62e5f353ba26afd40b8c6ae61e1a0f8d830b04 /src
parentFix sending encrypted edits (diff)
downloadnheko-c600827f7877b2c4ec403613b136576cba260771.tar.xz
Strip reply fallback from roomlist
fixes #630
Diffstat (limited to 'src')
-rw-r--r--src/Utils.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp

index 265b2873..8d5ae4a9 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp
@@ -43,11 +43,13 @@ createDescriptionInfo(const Event &event, const QString &localUser, const QStrin const auto username = displayName; const auto ts = QDateTime::fromMSecsSinceEpoch(msg.origin_server_ts); + auto body = utils::event_body(event).trimmed(); + if (mtx::accessors::relations(event).reply_to()) + body = QString::fromStdString(utils::stripReplyFromBody(body.toStdString())); return DescInfo{QString::fromStdString(msg.event_id), sender, - utils::messageDescription<T>( - username, utils::event_body(event).trimmed(), sender == localUser), + utils::messageDescription<T>(username, body, sender == localUser), utils::descriptiveTime(ts), msg.origin_server_ts, ts};