From 3b56ff2d85e607b2620ced0f45bdc2c6ef100feb Mon Sep 17 00:00:00 2001
From: Nicolas Werner <nicolas.werner@hotmail.de>
Date: Mon, 19 Jul 2021 16:14:09 +0200
Subject: [PATCH] Fix replying and editing stickers

---
 src/timeline/InputBar.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index 0f2107227..56d0d1ceb 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);
 }
 
-- 
GitLab