summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-07-19 16:14:09 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-07-19 16:14:09 +0200
commit3b56ff2d85e607b2620ced0f45bdc2c6ef100feb (patch)
treed569bd8137f20bda3ce5aea2a7d5bde7f7979fcf /src/timeline
parentMerge pull request #648 from Nheko-Reborn/stickers2 (diff)
downloadnheko-3b56ff2d85e607b2620ced0f45bdc2c6ef100feb.tar.xz
Fix replying and editing stickers
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/InputBar.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index 0f210722..56d0d1ce 100644
--- a/src/timeline/InputBar.cpp
+++ b/src/timeline/InputBar.cpp
@@ -515,6 +515,15 @@ InputBar::sticker(ImagePackModel *model, int row)
         sticker.url  = img.url;
         sticker.body = img.body;
 
+        if (!room->reply().isEmpty()) {
+                sticker.relations.relations.push_back(
+                  {mtx::common::RelationType::InReplyTo, room->reply().toStdString()});
+        }
+        if (!room->edit().isEmpty()) {
+                sticker.relations.relations.push_back(
+                  {mtx::common::RelationType::Replace, room->edit().toStdString()});
+        }
+
         room->sendMessageEvent(sticker, mtx::events::EventType::Sticker);
 }