mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 14:18:49 +03:00
parent
613b9a27da
commit
c600827f78
1 changed files with 4 additions and 2 deletions
|
@ -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};
|
||||
|
|
Loading…
Reference in a new issue