summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authortargetakhil <targetakhil@gmail.com>2021-04-11 20:01:49 +0530
committertargetakhil <targetakhil@gmail.com>2021-04-15 22:37:41 +0530
commit603ff33ea68b7c9e06578adf96fb6d824aa465df (patch)
treeb54aaaba1c517e652ac54906f3e54fdcb42f58e5 /src/timeline/TimelineModel.cpp
parentMerge branch 'master' of ssh://github.com/Nheko-Reborn/nheko (diff)
downloadnheko-603ff33ea68b7c9e06578adf96fb6d824aa465df.tar.xz
added basic forwarding
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r--src/timeline/TimelineModel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 8e96cb3e..e3efe5ad 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -823,6 +823,16 @@ TimelineModel::viewRawMessage(QString id) const
 }
 
 void
+TimelineModel::forwardMessage(QString eventId, QString roomId)
+{
+        auto e = events.get(eventId.toStdString(), "");
+        if (!e)
+                return;
+
+        emit forwardToRoom(e, roomId, cache::isRoomEncrypted(room_id_.toStdString()));
+}
+
+void
 TimelineModel::viewDecryptedRawMessage(QString id) const
 {
         auto e = events.get(id.toStdString(), "");