summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/timeline/InputBar.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index 1636bcd1..ac1d47a2 100644
--- a/src/timeline/InputBar.cpp
+++ b/src/timeline/InputBar.cpp
@@ -504,6 +504,16 @@ InputBar::generateMentions()
     for (const auto &m : mentions_)
         if (m != u"@room")
             userMentions.push_back(m.toStdString());
+
+    if (!room->reply().isEmpty()) {
+        auto replyToSender =
+          room->dataById(room->reply(), TimelineModel::Roles::UserId, "").toString().toStdString();
+        if (!replyToSender.empty() &&
+            std::ranges::find(userMentions, replyToSender) == userMentions.end()) {
+            userMentions.push_back(replyToSender);
+        }
+    }
+
     auto mention = mtx::common::Mentions{
       .user_ids = userMentions,
       .room     = containsAtRoom_,